You are here

public function Newfolder::buildPage in IMCE 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/ImcePlugin/Newfolder.php \Drupal\imce\Plugin\ImcePlugin\Newfolder::buildPage()

Builds imce page by adding required libraries and elements.

Overrides ImcePluginBase::buildPage

File

src/Plugin/ImcePlugin/Newfolder.php, line 35

Class

Newfolder
Defines Imce New Folder plugin.

Namespace

Drupal\imce\Plugin\ImcePlugin

Code

public function buildPage(array &$page, ImceFM $fm) {
  if ($fm
    ->hasPermission('create_subfolders')) {
    $page['#attached']['library'][] = 'imce/drupal.imce.newfolder';
  }
}