diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index f657633..3fa4d36 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -7,7 +7,7 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Template\Attribute; -use Drupal\filter\FilterFormat; +use Drupal\filter\Plugin\Core\Entity\FilterFormat; /** * Non-HTML markup language filters that generate HTML. @@ -225,24 +225,6 @@ function filter_config_import_delete($name, $new_config, $old_config) { } /** - * Implements hook_entity_info(). - */ -function filter_entity_info() { - $types['filter_format'] = array( - 'label' => 'Filter Format', - 'entity class' => 'Drupal\filter\FilterFormat', - 'controller class' => 'Drupal\Core\Config\Entity\ConfigStorageController', - 'config prefix' => 'filter.format', - 'entity keys' => array( - 'id' => 'format', - 'uuid' => 'uuid', - 'label' => 'name', - ), - ); - return $types; -} - -/** * Access callback: Checks access for disabling text formats. * * @param $format diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php index 94599e5..0dfe336 100644 --- a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php +++ b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php @@ -2,15 +2,30 @@ /** * @file - * Definition of Drupal\filter\FilterFormat. + * Definition of Drupal\filter\Plugin\Core\Entity\FilterFormat. */ -namespace Drupal\filter; +namespace Drupal\filter\Plugin\Core\Entity; use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\Core\Annotation\Plugin; +use Drupal\Core\Annotation\Translation; /** * Defines the Filter Format entity. + * + * @Plugin( + * id = "filter_format", + * label = @Translation("Filter Format"), + * module = "filter", + * controller_class = "Drupal\Core\Config\Entity\ConfigStorageController", + * config_prefix = "filter.format", + * entity_keys = { + * "id" = "format", + * "label" = "name", + * "uuid" = "uuid" + * } + * ) */ class FilterFormat extends ConfigEntityBase {