| @@ 64-81 (lines=18) @@ | ||
| 61 | * @param \eZ\Publish\Core\Search\Common\BackgroundIndexer $backgroundIndexer |
|
| 62 | * @param array $settings |
|
| 63 | */ |
|
| 64 | public function __construct( |
|
| 65 | RepositoryInterface $repository, |
|
| 66 | Handler $searchHandler, |
|
| 67 | ContentDomainMapper $contentDomainMapper, |
|
| 68 | PermissionCriterionResolver $permissionCriterionResolver, |
|
| 69 | BackgroundIndexer $backgroundIndexer, |
|
| 70 | array $settings = [] |
|
| 71 | ) { |
|
| 72 | $this->repository = $repository; |
|
| 73 | $this->searchHandler = $searchHandler; |
|
| 74 | $this->contentDomainMapper = $contentDomainMapper; |
|
| 75 | // Union makes sure default settings are ignored if provided in argument |
|
| 76 | $this->settings = $settings + [ |
|
| 77 | //'defaultSetting' => array(), |
|
| 78 | ]; |
|
| 79 | $this->permissionCriterionResolver = $permissionCriterionResolver; |
|
| 80 | $this->backgroundIndexer = $backgroundIndexer; |
|
| 81 | } |
|
| 82 | ||
| 83 | public function find(Query $query, array $languageFilter = [], bool $filterOnUserPermissions = true): SearchResult |
|
| 84 | { |
|
| @@ 66-77 (lines=12) @@ | ||
| 63 | * @param \eZ\Publish\API\Repository\PermissionCriterionResolver $permissionCriterionResolver |
|
| 64 | * @param array $settings |
|
| 65 | */ |
|
| 66 | public function __construct(RepositoryInterface $repository, SectionHandler $sectionHandler, LocationHandler $locationHandler, PermissionCriterionResolver $permissionCriterionResolver, array $settings = []) |
|
| 67 | { |
|
| 68 | $this->repository = $repository; |
|
| 69 | $this->sectionHandler = $sectionHandler; |
|
| 70 | $this->locationHandler = $locationHandler; |
|
| 71 | $this->permissionResolver = $repository->getPermissionResolver(); |
|
| 72 | $this->permissionCriterionResolver = $permissionCriterionResolver; |
|
| 73 | // Union makes sure default settings are ignored if provided in argument |
|
| 74 | $this->settings = $settings + [ |
|
| 75 | //'defaultSetting' => array(), |
|
| 76 | ]; |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * Creates a new Section in the content repository. |
|