You are here

public function ImceFolder::getItem in IMCE 8.2

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

Returns an item by name.

1 call to ImceFolder::getItem()
ImceFolder::checkItem in src/ImceFolder.php
Returns an item by name.

File

src/ImceFolder.php, line 121

Class

ImceFolder
Imce Folder.

Namespace

Drupal\imce

Code

public function getItem($name) {
  if (isset($this->items[$name])) {
    $item = $this->items[$name];
    if (!is_object($item)) {
      $item = isset($this->subfolders[$name]) ? $this
        ->addSubfolder($name) : $this
        ->addFile($name);
    }
    return $item;
  }
}