Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
|
@ -24,6 +24,10 @@ class CKEditorPlugin extends Plugin {
|
|||
/**
|
||||
* The plugin ID.
|
||||
*
|
||||
* This MUST match the name of the CKEditor plugin itself (written in
|
||||
* JavaScript). Otherwise CKEditor will throw JavaScript errors when it runs,
|
||||
* because it fails to load this CKEditor plugin.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $id;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class DrupalImageCaption extends PluginBase implements CKEditorPluginInterface,
|
|||
*/
|
||||
public function getCssFiles(Editor $editor) {
|
||||
return [
|
||||
drupal_get_path('module', 'ckeditor') . '/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css'
|
||||
drupal_get_path('module', 'ckeditor') . '/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter
|
|||
public function getConfig(Editor $editor) {
|
||||
// Reasonable defaults that provide expected basic behavior.
|
||||
$config = [
|
||||
'customConfig' => '', // Don't load CKEditor's config.js file.
|
||||
// Don't load CKEditor's config.js file.
|
||||
'customConfig' => '',
|
||||
'pasteFromWordPromptCleanup' => TRUE,
|
||||
'resize_dir' => 'vertical',
|
||||
'justifyClasses' => ['text-align-left', 'text-align-center', 'text-align-right', 'text-align-justify'],
|
||||
|
|
@ -126,7 +127,7 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getButtons() {
|
||||
$button = function($name, $direction = 'ltr') {
|
||||
$button = function ($name, $direction = 'ltr') {
|
||||
// In the markup below, we mostly use the name (which may include spaces),
|
||||
// but in one spot we use it as a CSS class, so strip spaces.
|
||||
// Note: this uses str_replace() instead of Html::cleanCssIdentifier()
|
||||
|
|
@ -420,8 +421,8 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter
|
|||
}
|
||||
// Generate setting that accurately reflects allowed tags and attributes.
|
||||
else {
|
||||
$get_attribute_values = function($attribute_values, $allowed_values) {
|
||||
$values = array_keys(array_filter($attribute_values, function($value) use ($allowed_values) {
|
||||
$get_attribute_values = function ($attribute_values, $allowed_values) {
|
||||
$values = array_keys(array_filter($attribute_values, function ($value) use ($allowed_values) {
|
||||
if ($allowed_values) {
|
||||
return $value !== FALSE;
|
||||
}
|
||||
|
|
@ -532,7 +533,7 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter
|
|||
// getConfig() method, and override the JavaScript at
|
||||
// Drupal.editors.ckeditor to somehow make validation of values for
|
||||
// attributes other than "class" and "style" work.
|
||||
$allowed_attributes = array_filter($attributes, function($value) {
|
||||
$allowed_attributes = array_filter($attributes, function ($value) {
|
||||
return $value !== FALSE;
|
||||
});
|
||||
if (count($allowed_attributes)) {
|
||||
|
|
@ -567,7 +568,7 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter
|
|||
// implies that all of its possible attribute values are disallowed,
|
||||
// thus we must look at the disallowed attribute values on allowed
|
||||
// attributes.
|
||||
$disallowed_attributes = array_filter($attributes, function($value) {
|
||||
$disallowed_attributes = array_filter($attributes, function ($value) {
|
||||
return $value === FALSE;
|
||||
});
|
||||
if (count($disallowed_attributes)) {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class Language extends CKEditorPluginBase implements CKEditorPluginConfigurableI
|
|||
*/
|
||||
public function getCssFiles(Editor $editor) {
|
||||
return [
|
||||
drupal_get_path('module', 'ckeditor') . '/css/plugins/language/ckeditor.language.css'
|
||||
drupal_get_path('module', 'ckeditor') . '/css/plugins/language/ckeditor.language.css',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,9 @@ class StylesCombo extends CKEditorPluginBase implements CKEditorPluginConfigurab
|
|||
$form_state->setError($element, $this->t('The provided list of styles is syntactically incorrect.'));
|
||||
}
|
||||
else {
|
||||
$style_names = array_map(function ($style) { return $style['name']; }, $styles_setting);
|
||||
$style_names = array_map(function ($style) {
|
||||
return $style['name'];
|
||||
}, $styles_setting);
|
||||
if (count($style_names) !== count(array_unique($style_names))) {
|
||||
$form_state->setError($element, $this->t('Each style must have a unique label.'));
|
||||
}
|
||||
|
|
@ -155,7 +157,7 @@ class StylesCombo extends CKEditorPluginBase implements CKEditorPluginConfigurab
|
|||
];
|
||||
if (!empty($classes)) {
|
||||
$configured_style['attributes'] = [
|
||||
'class' => implode(' ', array_map('trim', $classes))
|
||||
'class' => implode(' ', array_map('trim', $classes)),
|
||||
];
|
||||
}
|
||||
$styles_set[] = $configured_style;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class CKEditor extends EditorBase implements ContainerFactoryPluginInterface {
|
|||
protected $renderer;
|
||||
|
||||
/**
|
||||
* Constructs a Drupal\Component\Plugin\PluginBase object.
|
||||
* Constructs a \Drupal\ckeditor\Plugin\Editor\CKEditor object.
|
||||
*
|
||||
* @param array $configuration
|
||||
* A configuration array containing information about the plugin instance.
|
||||
|
|
@ -194,7 +194,7 @@ class CKEditor extends EditorBase implements ContainerFactoryPluginInterface {
|
|||
}
|
||||
}
|
||||
// Get a list of all buttons that are provided by all plugins.
|
||||
$all_buttons = array_reduce($this->ckeditorPluginManager->getButtons(), function($result, $item) {
|
||||
$all_buttons = array_reduce($this->ckeditorPluginManager->getButtons(), function ($result, $item) {
|
||||
return array_merge($result, array_keys($item));
|
||||
}, []);
|
||||
// Build a fake Editor object, which we'll use to generate JavaScript
|
||||
|
|
@ -210,8 +210,8 @@ class CKEditor extends EditorBase implements ContainerFactoryPluginInterface {
|
|||
0 => [
|
||||
'name' => 'All existing buttons',
|
||||
'items' => $all_buttons,
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'plugins' => $settings['plugins'],
|
||||
|
|
@ -418,7 +418,7 @@ class CKEditor extends EditorBase implements ContainerFactoryPluginInterface {
|
|||
];
|
||||
$this->moduleHandler->alter('ckeditor_css', $css, $editor);
|
||||
// Get a list of all enabled plugins' iframe instance CSS files.
|
||||
$plugins_css = array_reduce($this->ckeditorPluginManager->getCssFiles($editor), function($result, $item) {
|
||||
$plugins_css = array_reduce($this->ckeditorPluginManager->getCssFiles($editor), function ($result, $item) {
|
||||
return array_merge($result, array_values($item));
|
||||
}, []);
|
||||
$css = array_merge($css, $plugins_css);
|
||||
|
|
|
|||
Reference in a new issue