diff --git a/core/modules/editor/src/Form/EditorImageDialog.php b/core/modules/editor/src/Form/EditorImageDialog.php
index 34eed26..5f9e831 100644
--- a/core/modules/editor/src/Form/EditorImageDialog.php
+++ b/core/modules/editor/src/Form/EditorImageDialog.php
@@ -48,7 +48,7 @@ public function buildForm(array $form, FormStateInterface $form_state, FilterFor
$form['#prefix'] = '
';
$form['#suffix'] = '
';
- $editor = editor_load($filter_format->format);
+ $editor = editor_load($filter_format->id());
// Construct strings to use in the upload validators.
$image_upload = $editor->getImageUploadSettings();
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index cad200c..cb046b4 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -155,7 +155,7 @@ function filter_formats(AccountInterface $account = NULL) {
$formats['user'][$account_id] = array();
foreach ($formats['all'] as $format) {
if ($format->access('use', $account)) {
- $formats['user'][$account_id][$format->format] = $format;
+ $formats['user'][$account_id][$format->id()] = $format;
}
}
}
@@ -245,7 +245,7 @@ function filter_default_format(AccountInterface $account = NULL) {
// available is the user's default format.
$formats = filter_formats($account);
$format = reset($formats);
- return $format->format;
+ return $format->id();
}
/**
@@ -407,7 +407,7 @@ function template_preprocess_filter_guidelines(&$variables) {
$format = $variables['format'];
$variables['tips'] = array(
'#theme' => 'filter_tips',
- '#tips' => _filter_tips($format->format, FALSE),
+ '#tips' => _filter_tips($format->id(), FALSE),
);
}
diff --git a/core/modules/filter/src/Entity/FilterFormat.php b/core/modules/filter/src/Entity/FilterFormat.php
index 1f38428..dd33865 100644
--- a/core/modules/filter/src/Entity/FilterFormat.php
+++ b/core/modules/filter/src/Entity/FilterFormat.php
@@ -52,7 +52,7 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En
*
* @var string
*/
- public $format;
+ public $id;
/**
* Unique label of the text format.
@@ -61,11 +61,9 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En
* label but different filter configuration would impose a security risk.
* Therefore, each text format label must be unique.
*
- * @todo Rename to $label.
- *
* @var string
*/
- public $name;
+ public $label;
/**
* Weight of this format in the text format selector.
@@ -122,7 +120,7 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En
* {@inheritdoc}
*/
public function id() {
- return $this->format;
+ return $this->id;
}
/**
@@ -192,7 +190,7 @@ public function preSave(EntityStorageInterface $storage) {
parent::preSave($storage);
- $this->name = trim($this->label());
+ $this->label = trim($this->label());
}
/**