diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 7659ac0..bffe7fc 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -353,7 +353,7 @@ function _filter_tips($format_id, $long = FALSE) {
if ($filter->status) {
$tip = $filter->tips($long);
if (isset($tip)) {
- $tips[$format->getLabel()][$name] = array('tip' => $tip, 'id' => $name);
+ $tips[$format->label()][$name] = array('tip' => $tip, 'id' => $name);
}
}
}
diff --git a/core/modules/filter/src/Controller/FilterController.php b/core/modules/filter/src/Controller/FilterController.php
index e06e7f8..fe4d94f 100644
--- a/core/modules/filter/src/Controller/FilterController.php
+++ b/core/modules/filter/src/Controller/FilterController.php
@@ -47,7 +47,7 @@ function filterTips(FilterFormatInterface $filter_format = NULL) {
* The label of the filter format.
*/
public function getLabel(FilterFormatInterface $filter_format) {
- return $filter_format->getLabel();
+ return $filter_format->label();
}
}
diff --git a/core/modules/filter/src/Element/TextFormat.php b/core/modules/filter/src/Element/TextFormat.php
index 3b10adb..000984a 100644
--- a/core/modules/filter/src/Element/TextFormat.php
+++ b/core/modules/filter/src/Element/TextFormat.php
@@ -158,7 +158,7 @@ public static function processFormat(&$element, FormStateInterface $form_state,
);
$options = array();
foreach ($formats as $format) {
- $options[$format->id()] = $format->getLabel();
+ $options[$format->id()] = $format->label();
$element['format']['guidelines'][$format->id()] = array(
'#theme' => 'filter_guidelines',
'#format' => $format,
diff --git a/core/modules/filter/src/Entity/FilterFormat.php b/core/modules/filter/src/Entity/FilterFormat.php
index 6cb8dcc..e3232ba 100644
--- a/core/modules/filter/src/Entity/FilterFormat.php
+++ b/core/modules/filter/src/Entity/FilterFormat.php
@@ -33,7 +33,7 @@
* admin_permission = "administer filters",
* entity_keys = {
* "id" = "format",
- * "label" = "name",
+ * "label" = "label",
* "weight" = "weight",
* "status" = "status"
* },
diff --git a/core/modules/filter/src/FilterFormatAddForm.php b/core/modules/filter/src/FilterFormatAddForm.php
index ae7f98b..35c4ee2 100644
--- a/core/modules/filter/src/FilterFormatAddForm.php
+++ b/core/modules/filter/src/FilterFormatAddForm.php
@@ -26,7 +26,7 @@ public function form(array $form, FormStateInterface $form_state) {
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
- drupal_set_message($this->t('Added text format %format.', array('%format' => $this->entity->getLabel())));
+ drupal_set_message($this->t('Added text format %format.', array('%format' => $this->entity->label())));
return $this->entity;
}
diff --git a/core/modules/filter/src/FilterFormatEditForm.php b/core/modules/filter/src/FilterFormatEditForm.php
index befe30f..3ce6905 100644
--- a/core/modules/filter/src/FilterFormatEditForm.php
+++ b/core/modules/filter/src/FilterFormatEditForm.php
@@ -23,7 +23,7 @@ public function form(array $form, FormStateInterface $form_state) {
throw new NotFoundHttpException();
}
- $form['#title'] = $this->entity->getLabel();
+ $form['#title'] = $this->entity->label();
$form = parent::form($form, $form_state);
$form['roles']['#default_value'] = array_keys(filter_get_roles_by_format($this->entity));
return $form;
@@ -34,7 +34,7 @@ public function form(array $form, FormStateInterface $form_state) {
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
- drupal_set_message($this->t('The text format %format has been updated.', array('%format' => $this->entity->getLabel())));
+ drupal_set_message($this->t('The text format %format has been updated.', array('%format' => $this->entity->label())));
return $this->entity;
}
diff --git a/core/modules/filter/src/FilterFormatFormBase.php b/core/modules/filter/src/FilterFormatFormBase.php
index adc2cd6..b6abf1a 100644
--- a/core/modules/filter/src/FilterFormatFormBase.php
+++ b/core/modules/filter/src/FilterFormatFormBase.php
@@ -58,7 +58,7 @@ public function form(array $form, FormStateInterface $form_state) {
$form['name'] = array(
'#type' => 'textfield',
'#title' => $this->t('Name'),
- '#default_value' => $format->getLabel(),
+ '#default_value' => $format->label(),
'#required' => TRUE,
'#weight' => -30,
);
diff --git a/core/modules/filter/src/FilterFormatListBuilder.php b/core/modules/filter/src/FilterFormatListBuilder.php
index 6cdc0df..0003cfa 100644
--- a/core/modules/filter/src/FilterFormatListBuilder.php
+++ b/core/modules/filter/src/FilterFormatListBuilder.php
@@ -95,7 +95,7 @@ public function buildRow(EntityInterface $entity) {
// Check whether this is the fallback text format. This format is available
// to all roles and cannot be disabled via the admin interface.
if ($entity->isFallbackFormat()) {
- $row['label'] = String::placeholder($entity->getLabel());
+ $row['label'] = String::placeholder($entity->label());
$fallback_choice = $this->configFactory->get('filter.settings')->get('always_show_fallback_choice');
if ($fallback_choice) {
diff --git a/core/modules/filter/src/FilterPermissions.php b/core/modules/filter/src/FilterPermissions.php
index 57e685f..6e3fe7b 100644
--- a/core/modules/filter/src/FilterPermissions.php
+++ b/core/modules/filter/src/FilterPermissions.php
@@ -59,7 +59,7 @@ public function permissions() {
foreach ($formats as $format) {
if ($permission = $format->getPermissionName()) {
$permissions[$permission] = [
- 'title' => $this->t('Use the @label text format', ['@url' => $format->url(), '@label' => $format->getLabel()]),
+ 'title' => $this->t('Use the @label text format', ['@url' => $format->url(), '@label' => $format->label()]),
'description' => String::placeholder($this->t('Warning: This permission may have security implications depending on how the text format is configured.')),
];
}
diff --git a/core/modules/filter/src/Form/FilterDisableForm.php b/core/modules/filter/src/Form/FilterDisableForm.php
index 33ad51e..5795d8f 100644
--- a/core/modules/filter/src/Form/FilterDisableForm.php
+++ b/core/modules/filter/src/Form/FilterDisableForm.php
@@ -20,7 +20,7 @@ class FilterDisableForm extends EntityConfirmFormBase {
* {@inheritdoc}
*/
public function getQuestion() {
- return $this->t('Are you sure you want to disable the text format %format?', array('%format' => $this->entity->getLabel()));
+ return $this->t('Are you sure you want to disable the text format %format?', array('%format' => $this->entity->label()));
}
/**
@@ -49,7 +49,7 @@ public function getDescription() {
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->entity->disable()->save();
- drupal_set_message($this->t('Disabled text format %format.', array('%format' => $this->entity->getLabel())));
+ drupal_set_message($this->t('Disabled text format %format.', array('%format' => $this->entity->label())));
$form_state->setRedirectUrl($this->getCancelUrl());
}
diff --git a/core/modules/filter/src/Plugin/DataType/FilterFormat.php b/core/modules/filter/src/Plugin/DataType/FilterFormat.php
index 2ba1e3a..31ab7f7 100644
--- a/core/modules/filter/src/Plugin/DataType/FilterFormat.php
+++ b/core/modules/filter/src/Plugin/DataType/FilterFormat.php
@@ -32,7 +32,7 @@ public function getPossibleValues(AccountInterface $account = NULL) {
* {@inheritdoc}
*/
public function getPossibleOptions(AccountInterface $account = NULL) {
- return array_map(function ($format) { return $format->getLabel(); }, filter_formats());
+ return array_map(function ($format) { return $format->label(); }, filter_formats());
}
/**
@@ -47,6 +47,6 @@ public function getSettableValues(AccountInterface $account = NULL) {
*/
public function getSettableOptions(AccountInterface $account = NULL) {
// @todo: Avoid calling functions but move to injected dependencies.
- return array_map(function ($format) { return $format->getLabel(); }, filter_formats($account));
+ return array_map(function ($format) { return $format->label(); }, filter_formats($account));
}
}
diff --git a/core/modules/filter/src/Tests/FilterDefaultConfigTest.php b/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
index 4adb88d..939349a 100644
--- a/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
+++ b/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
@@ -39,7 +39,7 @@ function testInstallation() {
$format = entity_load('filter_format', 'filter_test');
$this->assertTrue((bool) $format);
$this->assertEqual($format->id(), 'filter_test');
- $this->assertEqual($format->getLabel(), 'Test format');
+ $this->assertEqual($format->label(), 'Test format');
$this->assertEqual($format->getWeight(), 2);
// Verify that format default property values have been added/injected.