You are here

public function ImceFM::createItem in IMCE 8

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

Creates and returns an imce file/folder object by name.

1 call to ImceFM::createItem()
ImceFM::init in src/ImceFM.php
Initializes the file manager.

File

src/ImceFM.php, line 304

Class

ImceFM
Imce File Manager.

Namespace

Drupal\imce

Code

public function createItem($type, $name, $conf = NULL) {
  $item = $type === 'folder' ? new ImceFolder($name, $conf) : new ImceFile($name);
  $item
    ->setFm($this);
  return $item;
}