Загружает карту сущностей

@param $objectManagerName

@return array|null
776452
public function loadEntityMap($objectManagerName)
    {
        $key = $this->getCacheKeyForObjectManagerName($objectManagerName);

        $cache = $this->getCache();

        if (false === $cache->contains($key)) {
            return false;
        }

        return $cache->fetch($key);
    }
695708
protected function getObjectManagerName($className)
    {
        $om = $this->registry->getManagerForClass($className);
        foreach ($this->registry->getManagerNames() as $emName=>$omName)
        {
            $instance = $this->registry->getManager($emName);
            if ($instance == $om)
            {
                return $emName;
            }
        }

        throw new \Exception("Object manager for class: $className not found.");
    }
172792
public function getListObjectManagerName()
    {
        if ($this->listObjectManagerName) {
            return $this->listObjectManagerName;
        }

        if (!$this->isValidDoctrineOrmModuleEntityManagerConfig()) {
            $this->listObjectManagerName = [];
            return $this->listObjectManagerName;
        }

        $doctrineConfig = $this->getDoctrineConfig();

        $listObjectManagerName = array_keys($doctrineConfig['entitymanager']);
        $prepareListObjectManagerName = array_map(function ($objectManagerName) {
            return 'doctrine.entitymanager.' . $objectManagerName;
        }, $listObjectManagerName);

        $this->listObjectManagerName = array_combine($listObjectManagerName, $prepareListObjectManagerName);

        return $this->listObjectManagerName;
    }
481422
public static function getRenderMethodTagsValues($objectManager)
    {
        $className = get_called_class();
        if (!is_callable(array($className, 'render'))) {
            return array();
        }

        $reflectionService = $objectManager->get(\TYPO3\Flow\Reflection\ReflectionService::class);
        return $reflectionService->getMethodTagsValues($className, 'render');
    }
741745
public function load(ObjectManager $manager)
    {
        $user = new User();
        $user->setFirstname('admin');
        $user->setFirstname('admin');
        $user->setUsername('admin');
        $user->setEmail('admin@test.com');
        $user->setState(1);

        $newPass = 'playground';

        $bcrypt = new Bcrypt;
        $bcrypt->setCost(14);

        $pass = $bcrypt->create($newPass);
        $user->setPassword($pass);

        $user->addRole(
            $this->getReference('admin-role') // load the stored reference
        );

        $manager->persist($user);

        $manager->flush();

        $user = new User();
        $user->setFirstname('supervisor');
        $user->setFirstname('supervisor');
        $user->setUsername('supervisor');
        $user->setEmail('supervisor@test.com');
        $user->setState(1);

        $newPass = 'playground';

        $bcrypt = new Bcrypt;
        $bcrypt->setCost(14);

        $pass = $bcrypt->create($newPass);
        $user->setPassword($pass);

        $user->addRole(
            $this->getReference('supervisor-role') // load the stored reference
        );

        $manager->persist($user);

        $manager->flush();

        $user = new User();
        $user->setFirstname('game-manager');
        $user->setFirstname('game-manager');
        $user->setUsername('gamemanager');
        $user->setEmail('game-manager@test.com');
        $user->setState(1);

        $newPass = 'playground';

        $bcrypt = new Bcrypt;
        $bcrypt->setCost(14);

        $pass = $bcrypt->create($newPass);
        $user->setPassword($pass);

        $user->addRole(
            $this->getReference('game-role') // load the stored reference
        );

        $manager->persist($user);

        $manager->flush();
    }
325089
public function getFieldsByView($objectName, $viewName)
    {
        $fieldConfigurations = array();

        $viewConfiguration = $this->getViewConfiguration($objectName, $viewName);
        if (is_array($viewConfiguration)) {
            $fieldConfigurations = $viewConfiguration["fields"];
            foreach ($fieldConfigurations as $i => $fieldConfiguration) {
                $fieldConfigurations[$i] = array_replace_recursive($this->defaultFieldConfiguration, $fieldConfiguration);
            }
        }
        usort($fieldConfigurations, array($this, 'sortByLocation'));

        return $fieldConfigurations;
    }
1320788
public static function instantiate($className)
    {
        $objectManager = self::get()->getObjectManager();
        $args = func_get_args();

        if (1 === count($args)) {
            return $objectManager->get($className);
        }

        return call_user_func_array([$objectManager, 'get'], $args);
    }
496950
public function load(ObjectManager $manager)
    {
        $this->manager = $manager;
        $options = $this->getOptions();

        $parser = new Parser();

        $data = [];
        foreach ($this->getFixtures() as $fixture) {
            $data[] = $parser->parse(file_get_contents($fixture));
        }

        $fixtures = $this->initFixtures($data);
        $builder = $this->container->get('kunstmaan_fixtures.builder.builder');
        $locale = isset($options['locale']) ? $options['locale'] : 'en_US';

        foreach ($this->getProviders() as $provider) {
            $builder->addProvider($provider);
        }

        /*
         * because of faker's magic calls we'll want to add this as last provider
         */
        $builder->addProvider(Factory::create($locale));
        $builder->setFixtures($fixtures);
        $builder->buildFixtures($manager);
    }
1233531
public function load(ObjectManager $manager)
    {
        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('jon-seller'));
        $sellerHubRef->setHub($this->getReference('sam-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.5);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('jon-seller'));
        $sellerHubRef->setHub($this->getReference('nick-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.6);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('jon-seller'));
        $sellerHubRef->setHub($this->getReference('ramon-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.55);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();




        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('stephen-seller'));
        $sellerHubRef->setHub($this->getReference('sam-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.5);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('stephen-seller'));
        $sellerHubRef->setHub($this->getReference('nick-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.6);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('stephen-seller'));
        $sellerHubRef->setHub($this->getReference('ramon-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.55);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();




        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('jo-seller'));
        $sellerHubRef->setHub($this->getReference('sam-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.5);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('jo-seller'));
        $sellerHubRef->setHub($this->getReference('nick-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.6);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('jo-seller'));
        $sellerHubRef->setHub($this->getReference('ramon-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.55);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();




        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('sterling-seller'));
        $sellerHubRef->setHub($this->getReference('sam-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.5);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('sterling-seller'));
        $sellerHubRef->setHub($this->getReference('nick-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.6);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('sterling-seller'));
        $sellerHubRef->setHub($this->getReference('nick-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.6);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('11:00');
        $windowMaker->setEndTime('13:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('sterling-seller'));
        $sellerHubRef->setHub($this->getReference('ramon-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.55);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();




        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('tom-seller'));
        $sellerHubRef->setHub($this->getReference('sam-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.5);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('tom-seller'));
        $sellerHubRef->setHub($this->getReference('nick-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.6);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();


        $sellerHubRef = new SellerHubRef();
        $sellerHubRef->setSeller($this->getReference('tom-seller'));
        $sellerHubRef->setHub($this->getReference('ramon-hub'));
        $sellerHubRef->setIsDefault(true);
        $sellerHubRef->setFixedFee(0.55);
        $sellerHubRef->setVariableFee(4);

        $windowMaker = new SellerWindowMaker();
        $windowMaker->setDeliveryType(HubWindow::DELIVERY_TYPE_PICKUP);
        $windowMaker->setDayOfWeekNumber(6);
        $windowMaker->setStartTime('09:00');
        $windowMaker->setEndTime('11:00');

        $sellerHubRef->addWindowMaker($windowMaker);

        $manager->persist($sellerHubRef);
        $manager->flush();
    }
468046
public function getScope($objectName)
    {
        if (!isset($this->objects[$objectName])) {
            $hint = ($objectName[0] === '\\') ? ' Hint: You specified an object name with a leading backslash!' : '';
            throw new Exception\UnknownObjectException('Object "' . $objectName . '" is not registered.' . $hint, 1265367590);
        }
        return $this->objects[$objectName]['s'];
    }
1374897
public function getObjectManager(): ObjectManagerInterface
    {
        if (!isset($this->earlyInstances[ObjectManagerInterface::class])) {
            debug_print_backtrace();
            throw new FlowException('The Object Manager is not available at this stage of the bootstrap run.', 1301120788);
        }
        return $this->earlyInstances[ObjectManagerInterface::class];
    }
846772
public static function getThumbnailGeneratorClassNames($objectManager)
    {
        /** @var ReflectionService $reflectionService */
        $reflectionService = $objectManager->get(ReflectionService::class);
        $generatorClassNames = $reflectionService->getAllImplementationClassNamesForInterface(ThumbnailGeneratorInterface::class);
        $configurationManager = $objectManager->get(ConfigurationManager::class);
        $generatorOptions = $configurationManager->getConfiguration('Settings', 'Neos.Media.thumbnailGenerators');
        $generators = [];
        foreach ($generatorClassNames as $generatorClassName) {
            if (isset($generatorOptions[$generatorClassName]['disable']) && $generatorOptions[$generatorClassName]['disable'] === true) {
                continue;
            }
            if (isset($generatorOptions[$generatorClassName]['priority'])) {
                $priority = $generatorOptions[$generatorClassName]['priority'];
            } else {
                $priority = $generatorClassName::getPriority();
            }
            $generators[] = [
                'priority' => (integer)$priority,
                'className' => $generatorClassName
            ];
        }

        $sorter = new PositionalArraySorter($generators, 'priority');
        return array_reverse($sorter->toArray());
    }
718887
public static function getActionMethodParameters($objectManager)
    {
        $reflectionService = $objectManager->get(ReflectionService::class);

        $result = [];

        $className = get_called_class();
        $methodNames = get_class_methods($className);
        foreach ($methodNames as $methodName) {
            if (strlen($methodName) > 6 && strpos($methodName, 'Action', strlen($methodName) - 6) !== false) {
                $result[$methodName] = $reflectionService->getMethodParameters($className, $methodName);
            }
        }

        return $result;
    }
278865
protected function getObjectManagerService(ServiceLocatorInterface $serviceLocator, $objectManagerServiceName)
    {
        $config = $serviceLocator->get('config');

        if (! $objectManagerServiceName && isset($config['thorr_persistence_dmm']['doctrine']['object_manager'])) {
            $objectManagerServiceName = $config['thorr_persistence_dmm']['doctrine']['object_manager'];
        }

        $objectManager = $objectManagerServiceName && $serviceLocator->has($objectManagerServiceName) ?
            $serviceLocator->get($objectManagerServiceName)
            : null;

        if (! $objectManager instanceof ObjectManager) {
            throw new Exception\InvalidServiceNameException(sprintf(
                'Invalid object manager type: "%s" is not a subtype of "%s"',
                is_object($objectManager) ? get_class($objectManager) : gettype($objectManager),
                ObjectManager::class
            ));
        }

        return $objectManager;
    }
1276996
public function getFields($objectName)
    {
        $fieldConfigurations = array();
        $modelConfiguration = $this->getModelConfiguration($objectName);
        if (is_array($modelConfiguration)) {
            $fieldConfigurations = $modelConfiguration['fields'];
        }

        return $fieldConfigurations;
    }
463362
private function getObjectManager($entityClassname)
    {
        $objectManager = $this->getContainer()->get('doctrine')->getManagerForClass($entityClassname);
        if ($objectManager) {
            return $objectManager;
        }

        $objectManager = $this->getContainer()->get('doctrine_mongodb')->getManagerForClass($entityClassname);
        if ($objectManager) {
            return $objectManager;
        }

        throw new \RuntimeException(sprintf('Class "%s" is not a managed entity', $entityClassname));
    }
988171
public static function objectsMethodValues(array $objectArray, string $methodName): array
    {
        $methodValues = [];

        foreach ($objectArray as $object) {
            $methodValues[] = $object->$methodName();
        }

        return $methodValues;
    }