Update to Drupal 8.1.1. For more information, see https://www.drupal.org/node/2718713
This commit is contained in:
parent
c0a0d5a94c
commit
9eae24d844
669 changed files with 3873 additions and 1553 deletions
|
@ -107,7 +107,7 @@ function template_preprocess_ckeditor_settings_toolbar(&$variables) {
|
|||
|
||||
// Set additional flag on the button if it can occur multiple times.
|
||||
if (!empty($button['multiple'])) {
|
||||
$button_item['multiple'] = true;
|
||||
$button_item['multiple'] = TRUE;
|
||||
}
|
||||
|
||||
return $button_item;
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Drupal\ckeditor\Plugin\CKEditorPlugin;
|
|||
|
||||
use Drupal\ckeditor\CKEditorPluginBase;
|
||||
use Drupal\ckeditor\CKEditorPluginContextualInterface;
|
||||
use Drupal\Component\Utility\NestedArray;
|
||||
use Drupal\ckeditor\CKEditorPluginManager;
|
||||
use Drupal\Core\Cache\Cache;
|
||||
use Drupal\Core\Cache\CacheBackendInterface;
|
||||
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
|
||||
|
@ -113,14 +113,7 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter
|
|||
list($config['allowedContent'], $config['disallowedContent']) = $this->generateACFSettings($editor);
|
||||
|
||||
// Add the format_tags setting, if its button is enabled.
|
||||
$toolbar_rows = array();
|
||||
$settings = $editor->getSettings();
|
||||
foreach ($settings['toolbar']['rows'] as $row_number => $row) {
|
||||
$toolbar_rows[] = array_reduce($settings['toolbar']['rows'][$row_number], function (&$result, $button_group) {
|
||||
return array_merge($result, $button_group['items']);
|
||||
}, array());
|
||||
}
|
||||
$toolbar_buttons = array_unique(NestedArray::mergeDeepArray($toolbar_rows));
|
||||
$toolbar_buttons = CKEditorPluginManager::getEnabledButtons($editor);
|
||||
if (in_array('Format', $toolbar_buttons)) {
|
||||
$config['format_tags'] = $this->generateFormatTagsSetting($editor);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ class CKEditorPluginManagerTest extends UnitTestCase {
|
|||
* @dataProvider providerGetEnabledButtons
|
||||
*/
|
||||
public function testGetEnabledButtons(array $toolbar_rows, array $expected_buttons) {
|
||||
$editor= $this->prophesize(Editor::class);
|
||||
$editor = $this->prophesize(Editor::class);
|
||||
$editor->getSettings()
|
||||
->willReturn(['toolbar' => ['rows' => $toolbar_rows]]);
|
||||
|
||||
|
|
Reference in a new issue