diff --git a/core/modules/system/src/Entity/Action.php b/core/modules/system/src/Entity/Action.php index cb83706..6f9157c 100644 --- a/core/modules/system/src/Entity/Action.php +++ b/core/modules/system/src/Entity/Action.php @@ -89,7 +89,10 @@ class Action extends ConfigEntityBase implements ActionConfigEntityInterface, En */ protected function getPluginCollection() { if (!$this->pluginCollection) { - $this->configuration['original_label'] = $this->getUnsubstitutedLabel(); + // Store the original label before argument substition in the plugin + // configuration so that forms can present the correct label to the user + // to edit. + $this->configuration['original_label'] = $this->label; $this->pluginCollection = new ActionPluginCollection(\Drupal::service('plugin.manager.action'), $this->plugin, $this->configuration); } return $this->pluginCollection; @@ -164,7 +167,7 @@ public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) */ public function label() { $label_arguments = $this->getPlugin()->getLabelArguments(); - $label = $this->getUnsubstitutedLabel(); + $label = $this->label; if (!empty($label_arguments)) { $label = new FormattableMarkup($label, $label_arguments); // Remove the safeness from the label as the label can contain user input. @@ -174,17 +177,6 @@ public function label() { } /** - * Gets the label of the entity before any substituions. - * - * @return string|null - * The label of the entity before any substituions of arguments from the - * plugin, or NULL if there is no label defined. - */ - protected function getUnsubstitutedLabel() { - return parent::label(); - } - - /** * {@inheritdoc} */ public function preSave(EntityStorageInterface $storage) {