You are here

public static function Imce::permissionInConf in IMCE 8

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

Checks a permission in a profile conf.

1 call to Imce::permissionInConf()
ImceFM::hasPermission in src/ImceFM.php
Checks if a permission exists in any of the predefined folders.

File

src/Imce.php, line 138

Class

Imce
Imce container class for helper methods.

Namespace

Drupal\imce

Code

public static function permissionInConf($permission, array $conf) {
  if (!empty($conf['folders'])) {
    foreach ($conf['folders'] as $folder_conf) {
      if (static::permissionInFolderConf($permission, $folder_conf)) {
        return TRUE;
      }
    }
  }
  return FALSE;
}