Updates the Aco Tree with all App route prefixes.

@param \Acl\Model\Entity\Aco $root The root note of Aco Tree
@return void
336127
protected function _processPrefixes($root)
    {
        foreach (array_keys($this->prefixes) as $prefix) {
            $controllers = $this->getControllerList(null, $prefix);
            $path = $this->rootNode . '/' . $prefix;
            $pathNode = $this->_checkNode($path, $prefix, $root->id);
            $this->foundACOs[$root->id][] = $prefix;
            if (isset($this->foundACOs[$pathNode->id])) {
                $this->foundACOs[$pathNode->id] += $this->_updateControllers($pathNode, $controllers, null, $prefix);
            } else {
                $this->foundACOs[$pathNode->id] = $this->_updateControllers($pathNode, $controllers, null, $prefix);
            }
        }
    }
833858
public function setPathPrefix($prefix)
    {
        parent::setPathPrefix($prefix);
        if (null === $this->pathPrefix) {
            $this->pathPrefix = $this->pathSeparator;
        }
    }
341304
protected function ensureDirectory($root)
	{
		if (!\is_dir($root)) {
			$umask = \umask(0);
			@\mkdir($root, $this->permissionMap['dir']['public'], true);
			\umask($umask);

			if (!\is_dir($root)) {
				throw new FileSystemException('Impossible to create the root directory "' . $root . '".');
			}
		}
	}
654851
protected function update()
    {
        foreach ($this->scheduledForUpdate as $objectHashId => $entity) {
            // If this entity was a child of aggregate roots, then call its methods to set the aggregate root Id
            $this->entityRegistry->runAggregateRootCallbacks($entity);
            $dataMapper = $this->getDataMapper($this->entityRegistry->getClassName($entity));
            $dataMapper->update($entity);
            $this->entityRegistry->registerEntity($entity);
        }
    }
684923
private function addAuthnStatement(DOMElement $root) : void
    {
        if ($this->authnInstant === null ||
            (
                $this->authnContextClassRef === null &&
                $this->authnContextDecl === null &&
                $this->authnContextDeclRef === null
            )
        ) {
            /* No authentication context or AuthnInstant => no authentication statement. */

            return;
        }

        $document = $root->ownerDocument;

        $authnStatementEl = $document->createElementNS(Constants::NS_SAML, 'saml:AuthnStatement');
        $root->appendChild($authnStatementEl);

        $authnStatementEl->setAttribute('AuthnInstant', gmdate('Y-m-d\TH:i:s\Z', $this->authnInstant));

        if ($this->sessionNotOnOrAfter !== null) {
            $authnStatementEl->setAttribute(
                'SessionNotOnOrAfter',
                gmdate('Y-m-d\TH:i:s\Z', $this->sessionNotOnOrAfter)
            );
        }
        if ($this->sessionIndex !== null) {
            $authnStatementEl->setAttribute('SessionIndex', $this->sessionIndex);
        }

        $authnContextEl = $document->createElementNS(Constants::NS_SAML, 'saml:AuthnContext');
        $authnStatementEl->appendChild($authnContextEl);

        if (!empty($this->authnContextClassRef)) {
            Utils::addString(
                $authnContextEl,
                Constants::NS_SAML,
                'saml:AuthnContextClassRef',
                $this->authnContextClassRef
            );
        }
        if (!empty($this->authnContextDecl)) {
            $this->authnContextDecl->toXML($authnContextEl);
        }
        if (!empty($this->authnContextDeclRef)) {
            Utils::addString(
                $authnContextEl,
                Constants::NS_SAML,
                'saml:AuthnContextDeclRef',
                $this->authnContextDeclRef
            );
        }

        Utils::addStrings(
            $authnContextEl,
            Constants::NS_SAML,
            'saml:AuthenticatingAuthority',
            false,
            $this->AuthenticatingAuthority
        );
    }
945830
public function registerMenuItems(ParentItem $root)
    {
        $root->addChild(
            ParentItem::class,
            'players',
            'expansion_players.menu.label',
            null // Permission are handled by sub elements.
        );
        $root->addChild(
            ChatCommandItem::class,
            'players/list',
            'expansion_players.menu.list',
            null,
            ['cmd' => '/players']
        );
    }
835295
public function generateSegments(string $root = null): void
    {
        $path = rawurldecode($this->sourceData['path'] ?? '');
        if ($path && $path != '/') {
            // drop root if exists
            if ($root && $root != '/') {
                $root = '/'. trim($root, '/'). '/';
                // prevent wrong generate action
                if (strpos($path, $root) === false) {
                    throw new HttpException("Uri path '{$path}' has no root such '{$root}'");
                }

                $path = substr($path, strlen($root));

                // update segments root
                $this->segmentsRoot = $root;
            }

            $segments = array_map('trim', preg_split('~/+~', $path, -1, PREG_SPLIT_NO_EMPTY));
            if ($segments != null) {
                // push index next
                foreach ($segments as $i => $segment) {
                    $this->segments[$i + 1] = $segment;
                }
            }
        }
    }
973546
public function updateAction(Request $request, $id)
    {
        $class_name = $this->container->getParameter('acs_settings.setting_class');
        $settingmanager = $this->get('acs.setting_manager');
        $user_fields = $settingmanager->loadUserFields();
        $em = $this->getDoctrine()->getManager();

        $entity = $this->get('security.context')->getToken()->getUser();

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find ConfigSetting entity.');
        }

        $editForm = $this->createForm(new ConfigSettingCollectionType($user_fields,$em), $entity);

        $editForm->bind($request);


        $postData = $request->request->get('acs_settings_usersettings');

        if ($editForm->isValid()) {
            if (isset($postData['settings'])) {
                    $settings = $postData['settings'];

                    foreach ($settings as $setting) {
                        $args = array(
                            'user' => $entity->getId(),
                            'setting_key' => $setting['setting_key'],
                        );

                        if(isset($setting['service_id'])){
                            $service = $em->getRepository('ACSACSPanelBundle:Service')->find($setting['service_id']);
                            $args['service'] = $service;
                        }

                        $panelsetting = $em->getRepository('ACSACSPanelBundle:PanelSetting')->findOneBy($args);

                        if ($panelsetting && isset($setting['value'])) {
                            $panelsetting->setValue($setting['value']);
                            $em->persist($panelsetting);
                            $em->flush();
                        }
                    }
                    $em->flush();
            }
            return $this->redirect($this->generateUrl('settings'));
        }

        return $this->render('ACSACSPanelSettingsBundle:ConfigSetting:new.html.twig', array(
            'entity' => $entity,
            'form'   => $editForm->createView(),
        ));
    }
465565
public function update($entity)
    {
        $identifier = $this->getIdentifier($entity);
        $data       = $this->builder->reduce($entity);

        $this->connection->update($this->tableName, $data, $identifier);

        $this->builder->resolve($entity);
    }
292927
protected function resolveCallbacksForRoot(array $root)
    {
        if (isset($root['accessControl'])) {
            $callable = $root['accessControl'];
            if (!is_callable($callable) && is_string($callable)) {
                $root['accessControl'] = $this->resolveCallable($callable);
            }
        }

        return $root;
    }
380315
public function setResolverArguments($root, array $args, GraphQLContext $context, ResolveInfo $resolveInfo): self
    {
        return $this
            ->setRoot($root)
            ->setArgs($args)
            ->setContext($context)
            ->setResolveInfo($resolveInfo);
    }
223222
public function mergeDevInto(RootPackageInterface $root, PluginState $state)
    {
        $this->mergeDevRequires($root, $state);
        $this->mergeDevAutoload($root);
        $this->mergeReferences($root);
    }
783936
public function build(RootNode &$root)
    {
        $parser = new RoutingRuleParser($this->routing_rule);
        
        try{
            $section_list_set = $parser->parse();
        }
        catch(RoutingRuleParseException $e){
            throw new RouterNodeBuilderException($this->routing_rule, 'Parse failed');
        }
        
        $node = $root;
        
        foreach($section_list_set as $section_list){
            while(($section = array_shift($section_list))!==null) {
                $last = empty($section_list);
                if (is_string($section)){
                    if ($last){
                        $node->leaf($section)->bind($this->filter, $this->event);
                        break;
                    }
                    $node = $node->node($section);
                }
                else if (is_array($section)){
                    $varname = $section['varname'] ?? null;
                    $regex = $section['regex'] ?? null;
                    $type = $section['type'] ?? null;
                    $regex = empty($regex) ? '.*' : $regex;
                    if ($last){
                        $node->leaf($regex,$varname,$type)->bind($this->filter, $this->event);
                        break;
                    }
                    $node = $node->node($regex,$varname,$type);
                }
                else if ($section instanceof EmptyRoutingPathInterface){
                    if ($last){
                        $node->leaf('()')->bind($this->filter, $this->event);
                        break;
                    }
                    throw new RouterNodeBuilderException($this->routing_rule, 'Empty section not allowed before last section');
                }
                else{
                    throw new RouterNodeBuilderException($this->routing_rule, 'invalid section');
                }
            }
        }
    }
619184
public function setRoot(Page $root)
    {
        if ($this->hasMainSection()) {
            $this->getMainSection()->setRoot($root->getRoot()->getMainSection());
        }

        return $this;
    }
936405
public function andRootIs(Page $root)
    {
        if (!$root->isRoot()) {
            throw new \InvalidArgumentException('Provided page is not a tree root.');
        }

        $suffix = $this->getSuffix();
        return $this->andWhere($this->getSectionAlias().'._root = :root'.$suffix)
                        ->setParameter('root'.$suffix, $root->getSection());
    }
672914
private static function buildAndDisplayAdUnitTree(
        AdUnit $root,
        array $adUnits
    ) {
        if (is_null($root)) {
            print "No root unit found.\n";

            return;
        }

        $treeMap = [];

        foreach ($adUnits as $adUnit) {
            $parentId = $adUnit->getParentId();

            if (!is_null($parentId)) {
                if (!array_key_exists($parentId, $treeMap)) {
                    $treeMap[$parentId] = [];
                }

                $treeMap[$parentId][] = $adUnit;
            }
        }

        self::displayInventoryTree($root, $treeMap);
    }
1284102
protected function mergeSuggests(RootPackageInterface $root)
    {
        if ( ! empty($suggests = $this->getPackage()->getSuggests())) {
            static::unwrapIfNeeded($root, 'setSuggests')
                ->setSuggests(array_merge($root->getSuggests(), $suggests));
        }
    }