You are here

public function ImceFolder::checkItem in IMCE 8

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

Returns an item by name.

Scans the folder if needed.

File

src/ImceFolder.php, line 136

Class

ImceFolder
Imce Folder.

Namespace

Drupal\imce

Code

public function checkItem($name) {
  if (!($item = $this
    ->getItem($name))) {
    if (!$this->scanned) {
      $this
        ->scan();
      $item = $this
        ->getItem($name);
    }
  }
  return $item;
}