You are here

public function Upload::buildPage in IMCE 8

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

Builds imce page by adding required libraries and elements.

Overrides ImcePluginBase::buildPage

File

src/Plugin/ImcePlugin/Upload.php, line 36

Class

Upload
Defines Imce Upload plugin.

Namespace

Drupal\imce\Plugin\ImcePlugin

Code

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