You are here

public function ImceFolder::hasPredefinedPath in IMCE 8.2

Same name and namespace in other branches
  1. 8 src/ImceFolder.php \Drupal\imce\ImceFolder::hasPredefinedPath()

Returns the first predefined descendent including itself.

File

src/ImceFolder.php, line 223

Class

ImceFolder
Imce Folder.

Namespace

Drupal\imce

Code

public function hasPredefinedPath() {
  if ($this
    ->isPredefined()) {
    return $this;
  }
  foreach ($this->subfolders as $folder) {
    if ($folder = $folder
      ->hasPredefinedPath()) {
      return $folder;
    }
  }
  return FALSE;
}