You are here

public function Resize::buildPage in IMCE 8

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

Builds imce page by adding required libraries and elements.

Overrides ImcePluginBase::buildPage

File

src/Plugin/ImcePlugin/Resize.php, line 34

Class

Resize
Defines Imce Resize plugin.

Namespace

Drupal\imce\Plugin\ImcePlugin

Code

public function buildPage(array &$page, ImceFM $fm) {

  // Check if resize permission exists.
  if ($fm
    ->hasPermission('resize_images')) {
    $page['#attached']['library'][] = 'imce/drupal.imce.resize';
  }
}