@param string $actionIdentifier

@throws \InvalidArgumentException

@return ActionInterface
15036
public function locate($actionIdentifier)
    {
        if (array_key_exists($actionIdentifier, self::ACTION_FACTORY_METHOD_MAP)) {
            return $this->factory->{self::ACTION_FACTORY_METHOD_MAP[$actionIdentifier]}();
        }
1007078
public function setFieldIdentifier($fieldIdentifier)
    {
        if ($fieldIdentifier == '' || Format::isIdentifier($fieldIdentifier)) {
            $this->fieldIdentifier = $fieldIdentifier;
        } else {
            $msg = "'${fieldIdentifier}' is not a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
67456
public function get(string $entryIdentifier)
    {
        $success = false;
        $value = apcu_fetch($this->identifierPrefix . 'entry_' . $entryIdentifier, $success);
        return ($success ? $value : $success);
    }
566342
public function getIdentifier($appendIdentifier = null)
    {
        $identifierParts = array_merge($this->parentScopes, [$this->scopeIdentifier, $appendIdentifier]);

        return implode('.', array_filter($identifierParts));
    }
342609
public function getIdentity(): ?IdentityInterface
    {
        if (!$this->identity) {
            // check user agent
            if (Session::get('auth:agent') === Request::getServer('HTTP_USER_AGENT')) {
                $this->identity = Session::get('auth:identity');
            } else {
                $this->clearIdentity();
            }
        }
        return $this->identity;
    }
387349
protected function createParsedIdentifier(SchemaIdentifierInterface $identifier): ParserIdentifierInterface
    {
        return $this->factory->createParsedIdentifier($this->position, $identifier);
    }
1044219
public function setResponseIdentifier($responseIdentifier)
    {
        if (Format::isIdentifier($responseIdentifier, false) === true) {
            $this->responseIdentifier = $responseIdentifier;
        } else {
            $msg = "The 'responseIdentifier' argument must be a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
22632
public function editAction($layoutIdentifier = null)
    {
        $settings = $this->settingsService->get();
        $layout = $this->backendLayoutRepository->findByIdentifier($layoutIdentifier,
            explode(",", $settings['backendlayout_pids']));

        if ($layout) {
            $storage = $this->storageRepository->loadElement("pages", $layoutIdentifier);
            $this->prepareStorage($storage);
            $this->view->assign('backendLayout', $layout);
            $this->view->assign('storage', $storage);
            $this->view->assign('editMode', 1);
        }
    }
1245609
public function helpCommand(string $commandIdentifier = null)
    {
        $exceedingArguments = $this->request->getExceedingArguments();
        if (count($exceedingArguments) > 0 && $commandIdentifier === null) {
            $commandIdentifier = $exceedingArguments[0];
        }

        if ($commandIdentifier === null) {
            $this->displayHelpIndex();
        } else {
            $matchingCommands = $this->commandManager->getCommandsByIdentifier($commandIdentifier);
            $numberOfMatchingCommands = count($matchingCommands);
            if ($numberOfMatchingCommands === 0) {
                $this->outputLine('<error>No command could be found that matches the command identifier "%s".</error>', [$commandIdentifier]);
                $this->quit(1);
            } elseif ($numberOfMatchingCommands > 1) {
                $this->outputLine('<error>%d commands match the command identifier "%s":</error>', [$numberOfMatchingCommands, $commandIdentifier]);
                $this->displayShortHelpForCommands($matchingCommands);
                $this->quit(1);
            } else {
                $this->displayHelpForCommand(array_shift($matchingCommands));
            }
        }
    }
1068818
protected function getCredentialsFor( $roleIdentifier )
    {
        $roleService = $this->getRepository()->getRoleService();

        // First try to load role, throws exception if not found.
        $role = $this->getRepository()->sudo(
            function() use ( $roleService, $roleIdentifier )
            {
                // make sure role name starts with uppercase as this is what default setup provides
                if ($roleIdentifier !== ucfirst($roleIdentifier)) {
                    @trigger_error(
                        "'{$roleIdentifier}' role name should start with uppercase letter",
                        E_USER_DEPRECATED
                    );
                }

                return $roleService->loadRoleByIdentifier(ucfirst($roleIdentifier));
            }
        );

        // create a new user, uses 'User' trait
        $username = $this->findNonExistingUserName();
        $password = $this->getUserManager()->getDefaultPassword();
        $email = "${username}@ez.no";
        $user = $this->getUserManager()->ensureUserExists( $username, $email, $password );

        // Assign role to created user (without limitation)
        $this->getRepository()->sudo(
            function() use ( $roleService, $role, $user )
            {
                return $roleService->assignRoleToUser(
                    $role,
                    $user
                );
            }
        );

        return array(
            'login'     => $username,
            'password'  => $password,
        );
    }
1091259
public function remove(string $entryIdentifier): bool
    {
        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058495);
        }

        return $this->backend->remove($entryIdentifier);
    }
697375
public function isIdentifierAvailable($newIdentifier){

        $returnValue = false;

        if(empty($newIdentifier) || is_null($newIdentifier)){
            throw new InvalidArgumentException("newIdentifier must be set");
        }

        if(!empty($this->identifier) && $newIdentifier == $this->identifier){
            $returnValue = true;
        }else{
            $relatedItem = $this->getRelatedItem();
            if(is_null($relatedItem)){
                $returnValue = true; //no restriction on identifier since not attached to any qti item
            }else{
                $idCollection = $relatedItem->getIdentifiedElements();
                $returnValue = !$idCollection->exists($newIdentifier);
            }
        }

        return $returnValue;
    }
56720
public function getConfigurationObjectForIdentifier(string $identifier): ObjectInterface
    {
        if (isset($this->identifiers[$identifier]) === true) {
            return $this->identifiers[$identifier];
        }

        return new Blackhole();
    }
330150
public function assignIdentifier($object, array $identifier) : void
    {
        if (! $object instanceof IdentifiableInterface) {
            throw new InvalidArgumentException(sprintf('%s must implement IdentifiableInterface.', get_class($object)));
        }

        $object->assignIdentifier($identifier);
    }
161341
public function setIdentifier($identifier)
    {
        if (preg_match(NodeIdentifierValidator::PATTERN_MATCH_NODE_IDENTIFIER, $identifier) !== 1) {
            throw new \InvalidArgumentException(sprintf('Invalid UUID "%s" given.', $identifier), 1385026112);
        }
        $this->identifier = $identifier;
    }
774814
public function setTemplateIdentifier($templateIdentifier)
    {
        if (is_string($templateIdentifier) === true && (empty($templateIdentifier) === true) || Format::isIdentifier($templateIdentifier, false) === true) {
            $this->templateIdentifier = $templateIdentifier;
        } else {
            $msg = "The 'templateIdentifier' must be an empty string or a valid QTI identifier, '" . gettype($templateIdentifier) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1210760
public function setIdentifier($identifier)
    {
        if (Format::isIdentifier($identifier, false) === true) {
            $this->identifier = $identifier;
        } else {
            $msg = "The 'identifier' argument must be a valid QTI identifier, '" . $identifier . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }