Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26861

Typo in Doc : when making searches for front end use you should use the `$languageFilter`

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: High High
    • None
    • None
    • Documentation
    • None

    Description

      https://doc.ez.no/display/DEVELOPER/Browsing%2C+finding%2C+viewing?focusedCommentId=33554500#comment-33554500

      Note that when making searches for front end use you should use the `$languageFilter` parameter of the `findLocations` and `findContent` functions and `Criterion\Visibility::VISIBLE` to filter the results accordingly. If not you may get results you do not wish.

      Example:
      $query = new LocationQuery([
      'filter' => new Criterion\LogicalAnd([
      new Criterion\Visibility(Criterion\Visibility::VISIBLE),
      new Criterion\ParentLocationId($parentLocation->id),
      ],
      'sortClauses' => $parentLocation->getSortClauses(),
      ]);
      $searchService->findLocations($query,
      ['languages' => $configResolver->getParameter('languages')]);

      Attachments

        Activity

          People

            Unassigned Unassigned
            sarah.haim-lubczanski-obsolete@ez.no Sarah Haïm-Lubczanski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: