Returns a list of action configs that are allowed to be shown

@return array
349886
protected function _getAllowedActions()
    {
        $actions = $this->_action()->getConfig('scaffold.actions');
        if ($actions === null) {
            $actions = array_keys($this->_crud()->getConfig('actions'));
        }

        $extraActions = $this->_action()->getConfig('scaffold.extra_actions') ?: [];

        $allActions = array_merge(
            $this->_normalizeActions($actions),
            $this->_normalizeActions($extraActions)
        );

        $blacklist = (array)$this->_action()->getConfig('scaffold.actions_blacklist');
        $blacklist = array_combine($blacklist, $blacklist);
        foreach ($this->_crud()->getConfig('actions') as $action => $config) {
            if ($config['className'] === 'Crud.Lookup') {
                $blacklist[$action] = $action;
            }
        }

        return array_diff_key($allActions, $blacklist);
    }
1072344
public function indexAction()
    {
        $configSectionManager = $this->container->get('admin.configuration.configsection_manager');
        $sections = $configSectionManager->getRepository()->findAllWithConfigGroups();
        $group = null;
        if ( count($sections) ) {
            $groups = $this->container->get('admin.configuration.configgroup_manager')->getRepository()->findByConfigGroupId($sections[0]->getId());
            if ( count($groups) ) {
                $group = $groups[0];
            }
        }

        return $this->renderTemplate($group);
    }
59666
public function getConfig()
    {
        return [
            'validators' => [
                'aliases'   => [
                    'consonant'            => Consonant::class,
                    'Consonant'            => Consonant::class,
                    'dateage'              => DateAge::class,
                    'dateAge'              => DateAge::class,
                    'DateAge'              => DateAge::class,
                    'ein'                  => Ein::class,
                    'Ein'                  => Ein::class,
                    'foldername'           => FolderName::class,
                    'folderName'           => FolderName::class,
                    'FolderName'           => FolderName::class,
                    'iataairlinecode'      => IataAirlineCode::class,
                    'iataAirlineCode'      => IataAirlineCode::class,
                    'IataAirlineCode'      => IataAirlineCode::class,
                    'iban'                 => Iban::class,
                    'Iban'                 => Iban::class,
                    'integer'              => Integer::class,
                    'Integer'              => Integer::class,
                    'luhn'                 => Luhn::class,
                    'Luhn'                 => Luhn::class,
                    'notinarray'           => NotInArray::class,
                    'notInArray'           => NotInArray::class,
                    'NotInArray'           => NotInArray::class,
                    'nowhitespace'         => NoWhitespace::class,
                    'noWhitespace'         => NoWhitespace::class,
                    'NoWhitespace'         => NoWhitespace::class,
                    'number'               => Number::class,
                    'Number'               => Number::class,
                    'password'             => Password::class,
                    'Password'             => Password::class,
                    'postcode'             => PostCode::class,
                    'postCode'             => PostCode::class,
                    'PostCode'             => PostCode::class,
                    'routingtransitnumber' => RoutingTransitNumber::class,
                    'routingTransitNumber' => RoutingTransitNumber::class,
                    'RoutingTransitNumber' => RoutingTransitNumber::class,
                    'ssn'                  => Ssn::class,
                    'Ssn'                  => Ssn::class,
                    'swift'                => Swift::class,
                    'Swift'                => Swift::class,
                    'username'             => Username::class,
                    'Username'             => Username::class,
                    'vatiN'                => VatIN::class,
                    'vatIN'                => VatIN::class,
                    'VatIN'                => VatIN::class,
                    'filecrc32'            => File\Crc32::class,
                    'fileCrc32'            => File\Crc32::class,
                    'FileCrc32'            => File\Crc32::class,
                    'filename'             => File\FileName::class,
                    'fileName'             => File\FileName::class,
                    'FileName'             => File\FileName::class,
                    'fileimagesize'        => File\ImageSize::class,
                    'fileImageSize'        => File\ImageSize::class,
                    'FileImageSize'        => File\ImageSize::class,
                    'fileiscompressed'     => File\IsCompressed::class,
                    'fileIsCompressed'     => File\IsCompressed::class,
                    'FileIsCompressed'     => File\IsCompressed::class,
                    'fileisimage'          => File\IsImage::class,
                    'fileIsImage'          => File\IsImage::class,
                    'FileIsImage'          => File\IsImage::class,
                    'filemd5'              => File\Md5::class,
                    'fileMd5'              => File\Md5::class,
                    'FileMd5'              => File\Md5::class,
                    'filemimetype'         => File\MimeType::class,
                    'fileMimeType'         => File\MimeType::class,
                    'FileMimeType'         => File\MimeType::class,
                    'filesha1'             => File\Sha1::class,
                    'fileSha1'             => File\Sha1::class,
                    'FileSha1'             => File\Sha1::class,
                    'filesize'             => File\Size::class,
                    'fileSize'             => File\Size::class,
                    'FileSize'             => File\Size::class,
                    'filewordcount'        => File\WordCount::class,
                    'fileWordCount'        => File\WordCount::class,
                    'FileWordCount'        => File\WordCount::class
                ],
                'factories' => [
                    Consonant::class            => InvokableFactory::class,
                    DateAge::class              => InvokableFactory::class,
                    Ein::class                  => InvokableFactory::class,
                    FolderName::class           => InvokableFactory::class,
                    IataAirlineCode::class      => InvokableFactory::class,
                    Iban::class                 => InvokableFactory::class,
                    Integer::class              => InvokableFactory::class,
                    Luhn::class                 => InvokableFactory::class,
                    NotInArray::class           => InvokableFactory::class,
                    NoWhitespace::class         => InvokableFactory::class,
                    Password::class             => InvokableFactory::class,
                    RoutingTransitNumber::class => InvokableFactory::class,
                    Ssn::class                  => InvokableFactory::class,
                    Swift::class                => InvokableFactory::class,
                    Username::class             => InvokableFactory::class,
                    VatIN::class                => InvokableFactory::class,
                    File\Crc32::class           => InvokableFactory::class,
                    File\FileName::class        => InvokableFactory::class,
                    File\ImageSize::class       => InvokableFactory::class,
                    File\IsCompressed::class    => InvokableFactory::class,
                    File\IsImage::class         => InvokableFactory::class,
                    File\Md5::class             => InvokableFactory::class,
                    File\MimeType::class        => InvokableFactory::class,
                    File\Sha1::class            => InvokableFactory::class,
                    File\Size::class            => InvokableFactory::class,
                    File\WordCount::class       => InvokableFactory::class
                ]
            ]
        ];
    }
1339796
public function actionFolders() {
		$sources = [];
		foreach ($this->config->sources as $key => $source) {
			if ($this->request->source && $this->request->source !== 'default' && $key !== $this->request->source && $this->request->path !== './') {
				continue;
			}

			$path = $source->getPath();

			try {
				$this->accessControl->checkPermission($this->getUserRole(), $this->action, $path);
			} catch (\Exception $e) {
				continue;
			}

			$sourceData = (object)[
				'baseurl' => $source->baseurl,
				'path' =>  str_replace(realpath($source->getRoot()) . Consts::DS, '', $path),
				'folders' => [],
			];

			$sourceData->folders[] = $path == $source->getRoot() ? '.' : '..';

			$dir = opendir($path);
			while ($file = readdir($dir)) {
				if (
					$file != '.' &&
					$file != '..' &&
					is_dir($path . $file) and
					(
						!$this->config->createThumb ||
						$file !== $this->config->thumbFolderName
					) and
					!in_array($file, $this->config->excludeDirectoryNames)
				) {
					$sourceData->folders[] = $file;
				}
			}

			$sources[$key] = $sourceData;
		}

		return [
			'sources' => $sources
		];
	}
1144858
public function behaviors() {

		return [
			'rbac' => [
				'class' => Yii::$app->core->getRbacFilterClass(),
				'actions' => [
					// Banner
					'assign-banner' => [ 'permission' => $this->crudPermission ],
					'clear-banner' => [ 'permission' => $this->crudPermission ],
					// Video
					'assign-video' => [ 'permission' => $this->crudPermission ],
					'clear-video' => [ 'permission' => $this->crudPermission ],
					// Gallery
					'update-gallery' => [ 'permission' => $this->crudPermission ],
					'get-gallery-item' => [ 'permission' => $this->crudPermission ],
					'add-gallery-item' => [ 'permission' => $this->crudPermission ],
					'update-gallery-item' => [ 'permission' => $this->crudPermission ],
					'delete-gallery-item' => [ 'permission' => $this->crudPermission ],
					// Elements
					'assign-element' => [ 'permission' => $this->crudPermission ],
					'remove-element' => [ 'permission' => $this->crudPermission ],
					// Widgets
					'assign-widget' => [ 'permission' => $this->crudPermission ],
					'remove-widget' => [ 'permission' => $this->crudPermission ],
					// Sidebars
					'assign-sidebar' => [ 'permission' => $this->crudPermission ],
					'remove-sidebar' => [ 'permission' => $this->crudPermission ],
					// Blocks
					'assign-block' => [ 'permission' => $this->crudPermission ],
					'remove-block' => [ 'permission' => $this->crudPermission ],
					// Model
					'bulk' => [ 'permission' => $this->crudPermission ],
					'generic' => [ 'permission' => $this->crudPermission ],
					'delete' => [ 'permission' => $this->crudPermission ]
				]
			],
			'verbs' => [
				'class' => VerbFilter::class,
				'actions' => [
					// Searching
					'auto-search' => [ 'post' ],
					// Banner
					'assign-banner' => [ 'post' ],
					'clear-banner' => [ 'post' ],
					// Video
					'assign-video' => [ 'post' ],
					'clear-video' => [ 'post' ],
					// Gallery
					'update-gallery' => [ 'post' ],
					'get-gallery-item' => [ 'post' ],
					'add-gallery-item' => [ 'post' ],
					'update-gallery-item' => [ 'post' ],
					'delete-gallery-item' => [ 'post' ],
					// Elements
					'assign-element' => [ 'post' ],
					'remove-element' => [ 'post' ],
					// Widgets
					'assign-widget' => [ 'post' ],
					'remove-widget' => [ 'post' ],
					// Sidebars
					'assign-sidebar' => [ 'post' ],
					'remove-sidebar' => [ 'post' ],
					// Blocks
					'assign-block' => [ 'post' ],
					'remove-block' => [ 'post' ],
					// Model
					'bulk' => [ 'post' ],
					'generic' => [ 'post' ],
					'delete' => [ 'post' ]
				]
			],
			'activity' => [
				'class' => ActivityBehavior::class,
				'admin' => true,
				'delete' => [ 'delete' ]
			]
		];
	}
432044
public function behaviors() {

		$behaviors = parent::behaviors();

		$behaviors[ 'rbac' ][ 'actions' ][ 'gallery' ] = [ 'permission' => $this->crudPermission ];
		$behaviors[ 'rbac' ][ 'actions' ][ 'data' ] = [ 'permission' => $this->crudPermission ];
		$behaviors[ 'rbac' ][ 'actions' ][ 'config' ] = [ 'permission' => $this->crudPermission ];
		$behaviors[ 'rbac' ][ 'actions' ][ 'settings' ] = [ 'permission' => $this->crudPermission ];

		$behaviors[ 'verbs' ][ 'actions' ][ 'gallery' ] = [ 'get' ];
		$behaviors[ 'verbs' ][ 'actions' ][ 'data' ] = [ 'get', 'post' ];
		$behaviors[ 'verbs' ][ 'actions' ][ 'config' ] = [ 'get', 'post' ];
		$behaviors[ 'verbs' ][ 'actions' ][ 'settings' ] = [ 'get', 'post' ];

		$behaviors[ 'activity' ] = [
			'class' => ActivityBehavior::class,
			'admin' => true,
			'create' => [ 'create' ],
			'update' => [ 'update' ],
			'delete' => [ 'delete' ]
		];

		return $behaviors;
	}
1106015
public function listActions()
    {
        if ($this->listActions === null) {
            $collectionConfig = $this->collectionConfig();
            if (isset($collectionConfig['list_actions'])) {
                $actions = $collectionConfig['list_actions'];
            } else {
                $actions = [];
            }
            $this->setListActions($actions);
        }

        if ($this->parsedListActions === false) {
            $this->parsedListActions = true;
            $this->listActions = $this->createListActions($this->listActions);
        }

        return $this->listActions;
    }
1284767
protected function formatConfig()
    {
        return array_merge([
            'identifier' => $this->config['client_id'],
            'secret' => $this->config['client_secret'],
            'callback_uri' => $this->config['redirect'],
        ], $this->config);
    }
1296636
private function getMapConfigPermissions()
    {
        $id = '_config';

        if (!\array_key_exists($id, $this->cache)) {
            $this->cache[$id] = [];
            $this->buildSystemPermissions($id);
        }

        return $this->cache[$id];
    }
1053113
public function sessionFormAction()
    {
        $config = $this->configHandler->getPlatformConfig();
        $form = $this->formFactory->create(
            new AdminForm\SessionType(
                $config->getSessionStorageType(),
                $config,
                $this->configHandler->getLockedParamaters()
            )
        );

        return array('form' => $form->createView());
    }
743802
private function getAllConfigNames()
    {
        if ($this->allConfig) {
            return $this->allConfig;
        }

        foreach ($this->configFactory->listAll() as $name) {
            $this->allConfig[] = $name;
        }

        return $this->allConfig;
    }
196022
public function getViewHelperConfig()
    {
        return [
            'aliases' => [
                'losrecaptcha/recaptcha'  => Form\View\Helper\Captcha\ReCaptcha::class,
                'losrecaptcha/invisible'  => Form\View\Helper\Captcha\Invisible::class,
            ],
            'factories' => [
                Form\View\Helper\Captcha\ReCaptcha::class => InvokableFactory::class,
                Form\View\Helper\Captcha\Invisible::class => InvokableFactory::class,
            ],
        ];
    }
149459
public function getPermissionActions()
    {
        $actions = [];

        /**
         * @var $route \Symfony\Component\Routing\Route
         */
        foreach ($this->router->getRouteCollection()->all() as $name => $route) {
            if ($route->hasOption('require_admin_permission')) {
                $options = explode('.', $route->getOption('require_admin_permission'));
                if (!array_key_exists($options[0], $actions))
                    $actions[$options[0]] = [];
                if (!in_array($options[1], $actions[$options[0]]))
                    $actions[$options[0]][] = $options[1];
            }
        }

        ksort($actions);

        return $actions;
    }
1174386
public function getDefaultActions()
    {
        /** @var ActiveController $owner */
        $owner = $this->owner;

        $defaultActions = $owner->actions();
        // set default indexes to avoid many isset() calls later
        $actions = [
            'index' => false,
            'view' => false,
            'print' => false,
            'update' => false,
            'delete' => false,
            'toggle' => false,
            'history' => false,
            'help' => false,
            'state' => false,
        ];
        $availableActions = array_merge($actions, $defaultActions);
        foreach ($availableActions as $action => $enabled) {
            $availableActions[$action] = $enabled && in_array($action, $this->buttons);
        }
        return $availableActions;
    }
1196288
public function getAdminPanelActions()
    {
        if (!$this->actions) {
            $this->actions = array();
            $adaptors = $this->getAdaptors();
            foreach ($adaptors as $adaptor) {
                $this->actions = array_merge($this->actions, $adaptor->getAdminPanelActions());
            }
        }

        return $this->actions;
    }
1178419
public function actionConfig()
    {
        // valid keys
        $keys = [Config::HTTP_EXCEPTION_NAV_ID];
        
        foreach (Yii::$app->request->bodyParams as $key => $value) {
            if (in_array($key, $keys)) {
                Config::set($key, $value);
            }
        }
        
        $data = [];
        $data[Config::HTTP_EXCEPTION_NAV_ID] = Config::get(Config::HTTP_EXCEPTION_NAV_ID, 0);
        $data['previewUrl'] = $this->module->previewUrl;
        return $data;
    }
254573
public static function get_available_configs_map()
    {
        $configs = array();

        foreach (self::$configs as $identifier => $config) {
            $configs[$identifier] = $config->getOption('friendly_name');
        }

        return $configs;
    }