You are here

public static function Imce::nameFilterInConf in IMCE 8

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

Returns name filtering regexp from a profile conf.

2 calls to Imce::nameFilterInConf()
Imce::folderInConf in src/Imce.php
Returns predefined/inherited configuration.
ImceFM::getNameFilter in src/ImceFM.php
Returns name filtering regexp.

File

src/Imce.php, line 196

Class

Imce
Imce container class for helper methods.

Namespace

Drupal\imce

Code

public static function nameFilterInConf(array $conf) {
  $filters = isset($conf['name_filters']) ? $conf['name_filters'] : [];
  if (empty($conf['allow_dot_files'])) {
    $filters[] = '^\\.|\\.$';
  }
  return $filters ? '/' . implode('|', $filters) . '/' : '';
}