You are here

public static function Imce::permissionInFolderConf in IMCE 8

Same name and namespace in other branches
  1. 8.2 src/Imce.php \Drupal\imce\Imce::permissionInFolderConf()

Checks a permission in a folder conf.

4 calls to Imce::permissionInFolderConf()
Imce::folderInConf in src/Imce.php
Returns predefined/inherited configuration.
Imce::permissionInConf in src/Imce.php
Checks a permission in a profile conf.
ImceFolder::getConf in src/ImceFolder.php
Returns folder configuration.
ImceFolder::getPermission in src/ImceFolder.php
Returns a permission value.

File

src/Imce.php, line 152

Class

Imce
Imce container class for helper methods.

Namespace

Drupal\imce

Code

public static function permissionInFolderConf($permission, $folder_conf) {
  if ($folder_conf && !empty($folder_conf['permissions'])) {
    $permissions = $folder_conf['permissions'];
    return isset($permissions[$permission]) ? (bool) $permissions[$permission] : !empty($permissions['all']);
  }
  return FALSE;
}