You are here

public function ImceFM::checkItem in IMCE 8

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

Checks the existence of a user provided item path.

Scans the parent folder and returns the item object if it is accessible.

2 calls to ImceFM::checkItem()
ImceFM::checkFile in src/ImceFM.php
Checks if the user provided file path is accessible.
ImceFM::initSelection in src/ImceFM.php
Initiates the selection with a list of user provided item paths.

File

src/ImceFM.php, line 293

Class

ImceFM
Imce File Manager.

Namespace

Drupal\imce

Code

public function checkItem($path) {
  if ($parts = Imce::splitPath($path)) {
    if ($folder = $this
      ->checkFolder($parts[0])) {
      return $folder
        ->checkItem($parts[1]);
    }
  }
}