Get the Tags permissions.

@return array
171809
private function getTagsPermissions()
    {
        return [
            [
                'name'        => 'Tags - List all tags',
                'description' => 'Allow to list all tags.',
                'slug'        => TagsPolicy::PERMISSION_LIST,
            ],
            [
                'name'        => 'Tags - View a tag',
                'description' => 'Allow to display a tag.',
                'slug'        => TagsPolicy::PERMISSION_SHOW,
            ],
            [
                'name'        => 'Tags - Create a tag',
                'description' => 'Allow to create a tag.',
                'slug'        => TagsPolicy::PERMISSION_CREATE,
            ],
            [
                'name'        => 'Tags - Update a tag',
                'description' => 'Allow to update a tag.',
                'slug'        => TagsPolicy::PERMISSION_UPDATE,
            ],
            [
                'name'        => 'Tags - Delete a tag',
                'description' => 'Allow to delete a tag.',
                'slug'        => TagsPolicy::PERMISSION_DELETE,
            ],
        ];
    }
502625
public function getUserFlags() : array
    {
        if ($this->flags !== null) {
            return $this->flags;
        }

        $this->flags = [];
        $usergroups = $this->usergroups;

        foreach ($usergroups as $usergroup) {
            $group = $usergroup->group;
            $flags = $group->flags;

            if (!empty($flags)) {
                $this->flags = array_merge($this->flags, $flags);
            }
        }

        return $this->flags;
    }
412683
private function getCategoriesPermissions()
    {
        return [
            [
                'name'        => 'Categories - List all categories',
                'description' => 'Allow to list all categories.',
                'slug'        => CategoriesPolicy::PERMISSION_LIST,
            ],
            [
                'name'        => 'Categories - View a category',
                'description' => 'Allow to display a category.',
                'slug'        => CategoriesPolicy::PERMISSION_SHOW,
            ],
            [
                'name'        => 'Categories - Create a category',
                'description' => 'Allow to create a category.',
                'slug'        => CategoriesPolicy::PERMISSION_CREATE,
            ],
            [
                'name'        => 'Categories - Update a category',
                'description' => 'Allow to update a category.',
                'slug'        => CategoriesPolicy::PERMISSION_UPDATE,
            ],
            [
                'name'        => 'Categories - Delete a category',
                'description' => 'Allow to delete a category.',
                'slug'        => CategoriesPolicy::PERMISSION_DELETE,
            ],
        ];
    }
1358761
private function getConfigPermissions()
    {
        if (null === $this->cacheConfigPermissions) {
            $sps = $this->provider->getConfigPermissions();
            $this->cacheConfigPermissions = [];

            foreach ($sps as $sp) {
                $classAction = PermissionUtils::getMapAction($sp->getClass());
                $fieldAction = PermissionUtils::getMapAction($sp->getField());
                $this->cacheConfigPermissions[$classAction][$fieldAction][$sp->getOperation()] = $sp;
            }
        }

        return $this->cacheConfigPermissions;
    }
200719
public function permissions()
    {
        if (is_array($this->permissions)) {
            return $this->permissions;
        }

        if ($this->permissions) {
            return [ $this->permissions ];
        }

        return false;
    }
1168548
public function getPrivateTagsList()
    {
        $config = SiteConfig::current_site_config();
        //Filter out global excluded tags and non configured Organisations
        $pri_tags = PrivateTag::get()->filter(['HailID:not' => json_decode($config->HailExcludePrivateTagsIDs), 'HailOrgID' => json_decode($config->HailOrgsIDs)]);

        return $pri_tags->sort(['HailOrgName ASC', 'Name ASC'])->map('HailID', 'FullName')->toArray();
    }
721639
public static function map()
    {
        $permissions = [];

        foreach (static::get() as $permission) {
            $permissions[$permission->permission][] = (string) $permission->group_id;
        }

        return $permissions;
    }
20445
protected function tagsFromRequest() {
		$tags = $this->owner->getRequest()->getVar('tags') ? $this->owner->getRequest()->getVar('tags') : '';

		if (strlen($tags)) {
			$tags = explode(',', $tags);
		} else {
			$tags = array();
		}
		
		return $tags;
	}
1149097
public function getPermissions(): array
    {
        $userID = $this->getID();
        if ($userID === null) {
            return [];
        }
        $data = Internal\Data::getValue('bearcms/users/user/' . md5($userID) . '.json');
        if ($data !== null) {
            $user = json_decode($data, true);
            return isset($user['permissions']) ? $user['permissions'] : [];
        }
        return [];
    }
979809
public function getTags()
    {
        $tags = [];
        foreach ($this->getFileVersion()->getTags() as $tag) {
            /* @var TagInterface $tag */
            array_push($tags, $tag->getName());
        }

        return $tags;
    }
338233
public function rolesPermissions() {
    return [
      self::ROLE_USER => [
      ],
      self::ROLE_USER_MANAGER => [
        self::USER_VIEW,
        self::USER_CREATE,
        self::USER_UPDATE,
        self::USER_CHANGE_SECURITY_INFO,
        self::USER_CHANGE_PROFILE_INFO,
      ],
      self::ROLE_ADMIN => [
      ],
    ];
  }
770478
private function getPermissionActions()
    {
        $actions = [];

        /**
         * @var $route \Symfony\Component\Routing\Route
         */
        foreach ($this->get('router')->getRouteCollection()->all() as $name => $route) {
            if ($route->hasOption('require_admin_permission')) {
                list(, $action) = explode('.', $route->getOption('require_admin_permission'));
                $actions[$action] = [
                    'id'   => $action,
                    'name' => $action
                ];
            }
        }

        ksort($actions);

        return array_values($actions);
    }
939337
public function getAllPermissions()
    {

        $permissions = [];

        $roles = $this->group->roles()->with('permissions')->get();

        // Go through every role...
        foreach ($roles as $role) {

            // ... in every defined permission
            foreach ($role->permissions as $permission) {

                // only add permissions if it is not an inverse
                if (! $permission->pivot->not)
                    array_push($permissions, $permission->title);
            }

        }

        return $permissions;
    }
624075
public function permissions()
    {
        $permissions = [];
        foreach (config('typicms.permissions') as $module => $perms) {
            $key = __(ucfirst($module));
            $permissions[$key] = $perms;
        }
        ksort($permissions, SORT_LOCALE_STRING);

        return $permissions;
    }
1372584
public function getPermissions()
    {
        $permissions = [[], []];

        foreach ($this->roles as $role) {
            $permissions[] = $role->getPermissions();
        }

        return call_user_func_array('array_merge', $permissions);
    }
1304457
public static function getTags()
    {
        $finder = new Tag\Finder\Finder();

        foreach (func_get_args() as $arg) {
            if (is_string($arg)) {
                $finder->addFilter(new Tag\Finder\Group($arg));
            } elseif ($arg instanceof PageInterface) {
                $finder->addFilter(new Tag\Finder\AppliedToPage($arg));
            } elseif ($arg instanceof TagInterface) {
                $finder->addFilter(new Tag\Finder\AppliedWith($arg));
            }
        }

        return $finder
            ->setOrderBy('group', 'asc')
            ->setOrderBy('name', 'asc')
            ->findAll();
    }
898108
protected static function fetchUserTags()
    {
        $files = Bus::fetch('resources/tags', false);
        //
        if (!is_null($files)) {
            foreach (Bus::fetch('resources/tags', false) as $file) {
                Bus::need($file);
            }
        }
    }