eZ\Publish\Core\Repository\RoleService::getLimitationTypesByModuleFunction PHP Method

getLimitationTypesByModuleFunction() public method

Typically used for: - Internal validation limitation value use on Policies - Role admin gui for editing policy limitations incl list limitation options via valueSchema()
public getLimitationTypesByModuleFunction ( string $module, string $function ) : eZ\Publish\SPI\Limitation\Type[]
$module string Legacy name of "controller", it's a unique identifier like "content"
$function string Legacy name of a controller "action", it's a unique within the controller like "read"
return eZ\Publish\SPI\Limitation\Type[]
    public function getLimitationTypesByModuleFunction($module, $function)
    {
        if (empty($this->settings['policyMap'][$module][$function])) {
            return array();
        }
        $types = array();
        try {
            foreach (array_keys($this->settings['policyMap'][$module][$function]) as $identifier) {
                $types[$identifier] = $this->limitationService->getLimitationType($identifier);
            }
        } catch (LimitationNotFoundException $e) {
            throw new BadStateException("{$module}/{$function}", "policyMap configuration is referring to non existing identifier: {$identifier}", $e);
        }
        return $types;
    }