getDomainName example

$this->repositories = $repositories;
        $this->evaluation = $evaluation;
        $this->indexFactory = $indexFactory;
    }

    /** * @return void */
    public function index(ProgressHelperInterface $helper)
    {
        foreach ($this->repositories as $repository) {
            $index = $this->indexFactory->createIndexConfiguration($repository->getDomainName());

            $this->createIndex($index);
            $this->createMapping($repository$index->getName());
            $this->populateEntity($index->getName()$repository$helper);
            $this->createAlias($index->getName()$index->getAlias());
        }
    }

    /** * @param string $index * @param array<int> $ids * * @return void */
$repository = $registry->getRepository($criteria);

            if (!$repository instanceof EsAwareRepository) {
                continue;
            }

            $output->writeln(sprintf('Sync %s with id %s', $backlog['entity']$backlog['entity_id']));

            if ($backlog['entity'] === Article::class) {
                $this->indexArticle($backlog['entity_id']);
            } else {
                $index = $this->getIndexName($repository->getDomainName());
                $indexer->indexEntities($index$repository[$backlog['entity_id']]);
            }
        }

        $ids = array_column($backlogs, 'id');

        $backlogService->cleanup($ids);

        return 0;
    }

    
Home | Imprint | This part of the site doesn't use cookies.