public static function ContentSyncDialogHelper::attachLibraries in Content Synchronization 3.0.x
Same name and namespace in other branches
- 8.2 src/Utility/ContentSyncDialogHelper.php \Drupal\content_sync\Utility\ContentSyncDialogHelper::attachLibraries()
- 8 src/Utility/ContentSyncDialogHelper.php \Drupal\content_sync\Utility\ContentSyncDialogHelper::attachLibraries()
Attach libraries required by (modal) dialogs.
Parameters
array $build: A render array.
File
- src/
Utility/ ContentSyncDialogHelper.php, line 62
Class
- ContentSyncDialogHelper
- Helper class for dialog methods.
Namespace
Drupal\content_sync\UtilityCode
public static function attachLibraries(array &$build) {
$build['#attached']['library'][] = 'content_sync/content_sync.admin.dialog';
// @see \Drupal\content_sync\Element\content_syncHtmlEditor::preRendercontent_syncHtmlEditor
if (\Drupal::moduleHandler()
->moduleExists('imce') && Imce::access()) {
$element['#attached']['library'][] = 'imce/drupal.imce.ckeditor';
$element['#attached']['drupalSettings']['content_sync']['html_editor']['ImceImageIcon'] = file_create_url(drupal_get_path('module', 'imce') . '/js/plugins/ckeditor/icons/imceimage.png');
}
}