Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-6764

Add `contentId` property to TaxonomyEntry domain object

    XMLWordPrintable

Details

    • Ibexa Experience
    • Yes

    Description

      As fetching content data from the content property in TaxonomyEntry domain object is expensive (it's a proxy object as of now), we could at least add the contentId property.

      Steps to reproduce:

      1. Add a new Tag to Tags taxonomy.
      2. Create a new simple Controller with the following code:
        <?php
        
        namespace App\Controller;
        
        use Ibexa\Contracts\Taxonomy\Service\TaxonomyServiceInterface;
        use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
        use Symfony\Component\HttpFoundation\Response;
        
        class TestController extends AbstractController
        {
            public function __construct(
                private readonly TaxonomyServiceInterface $service
            ) {
            }
        
            public function index(): Response
            {
                foreach($this->service->loadAllEntries('tags') as $entry) {
                    dump($entry);
                }
                
                return new Response();
            }
        }
        
        "routes.yaml"
        index:
            path: /test
            controller: App\Controller\TestController::index
        
      3. Access /test URI.

      Result:
      One is presented with a dumped Taxonomy Entry entity without contentId property.

      Expected result:
      It would be ideal if one is presented with a dumped Taxonomy Entry entity with contentId property.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              bartlomiej.wajda@ibexa.co Bartłomiej Wajda
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: