function ListPlugin::getElementsSubset

Same name in other branches
  1. 9 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin::getElementsSubset()
  2. 10 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin::getElementsSubset()

Overrides CKEditor5PluginElementsSubsetInterface::getElementsSubset

File

core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php, line 90

Class

ListPlugin
CKEditor 5 List plugin.

Namespace

Drupal\ckeditor5\Plugin\CKEditor5Plugin

Code

public function getElementsSubset() : array {
    $subset = $this->getPluginDefinition()
        ->getElements();
    $subset = array_diff($subset, [
        '<ol reversed start>',
    ]);
    $reversed_enabled = $this->getConfiguration()['properties']['reversed'];
    $start_index_enabled = $this->getConfiguration()['properties']['startIndex'];
    $subset[] = "<ol" . ($reversed_enabled ? ' reversed' : '') . ($start_index_enabled ? ' start' : '') . '>';
    return $subset;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.