diff --git a/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php b/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php index 18ba2c9..f3eb4b9 100644 --- a/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php +++ b/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php @@ -7,69 +7,38 @@ namespace Drupal\Core\Entity; +use Drupal\Core\Form\ConfirmFormInterface; + /** * Provides an generic base class for an entity-based confirmation form. */ -abstract class EntityConfirmFormBase extends EntityFormController { - - /** - * Returns the question to ask the user. - * - * @return string - * The form question. The page title will be set to this value. - */ - abstract protected function getQuestion(); +abstract class EntityConfirmFormBase extends EntityFormController implements ConfirmFormInterface { /** - * Returns the page to go to if the user cancels the action. - * - * @return string|array - * This can be either: - * - A string containing a Drupal path. - * - An associative array with a 'path' key. Additional array values are - * passed as the $options parameter to l(). - * If the 'destination' query parameter is set in the URL when viewing a - * confirmation form, that value will be used instead of this path. - */ - abstract protected function getCancelPath(); - - /** - * Returns additional text to display as a description. - * - * @return string - * The form description. + * {@inheritdoc} */ - protected function getDescription() { + public function getDescription() { return t('This action cannot be undone.'); } /** - * Returns a caption for the button that confirms the action. - * - * @return string - * The form confirmation text. + * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Confirm'); } /** - * Returns a caption for the link which cancels the action. - * - * @return string - * The form cancellation text. + * {@inheritdoc} */ - protected function getCancelText() { + public function getCancelText() { return t('Cancel'); } /** - * Returns the internal name used to refer to the confirmation item. - * - * @return string - * The internal form name. + * {@inheritdoc} */ - protected function getFormName() { + public function getFormName() { return 'confirm'; } diff --git a/core/lib/Drupal/Core/Form/ConfirmFormBase.php b/core/lib/Drupal/Core/Form/ConfirmFormBase.php index 2aedb41..39f66ff 100644 --- a/core/lib/Drupal/Core/Form/ConfirmFormBase.php +++ b/core/lib/Drupal/Core/Form/ConfirmFormBase.php @@ -10,71 +10,38 @@ /** * Provides an generic base class for a confirmation form. */ -abstract class ConfirmFormBase implements FormInterface { +abstract class ConfirmFormBase implements ConfirmFormInterface { /** - * Returns the question to ask the user. - * - * @return string - * The form question. The page title will be set to this value. + * {@inheritdoc} */ - abstract protected function getQuestion(); - - /** - * Returns the page to go to if the user cancels the action. - * - * @return string|array - * This can be either: - * - A string containing a Drupal path. - * - An associative array with a 'path' key. Additional array values are - * passed as the $options parameter to l(). - * If the 'destination' query parameter is set in the URL when viewing a - * confirmation form, that value will be used instead of this path. - */ - abstract protected function getCancelPath(); - - /** - * Returns additional text to display as a description. - * - * @return string - * The form description. - */ - protected function getDescription() { + public function getDescription() { return t('This action cannot be undone.'); } /** - * Returns a caption for the button that confirms the action. - * - * @return string - * The form confirmation text. + * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Confirm'); } /** - * Returns a caption for the link which cancels the action. - * - * @return string - * The form cancellation text. + * {@inheritdoc} */ - protected function getCancelText() { + public function getCancelText() { return t('Cancel'); } /** - * Returns the internal name used to refer to the confirmation item. - * - * @return string - * The internal form name. + * {@inheritdoc} */ - protected function getFormName() { + public function getFormName() { return 'confirm'; } /** - * Implements \Drupal\Core\Form\FormInterface::buildForm(). + * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { $path = $this->getCancelPath(); @@ -114,7 +81,7 @@ public function buildForm(array $form, array &$form_state) { } /** - * Implements \Drupal\Core\Form\FormInterface::validateForm(). + * {@inheritdoc} */ public function validateForm(array &$form, array &$form_state) { } diff --git a/core/lib/Drupal/Core/Form/ConfirmFormInterface.php b/core/lib/Drupal/Core/Form/ConfirmFormInterface.php new file mode 100644 index 0000000..5c34f9a --- /dev/null +++ b/core/lib/Drupal/Core/Form/ConfirmFormInterface.php @@ -0,0 +1,68 @@ + $this->action->label())); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } @@ -40,7 +40,7 @@ protected function getConfirmText() { /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/system/actions'; } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/FeedDelete.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/FeedDelete.php index d613c39..b693fc6 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/FeedDelete.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/FeedDelete.php @@ -32,21 +32,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the feed %feed?', array('%feed' => $this->feed->label())); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/services/aggregator'; } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/FeedItemsDelete.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/FeedItemsDelete.php index dbb79cd..9407a53 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/FeedItemsDelete.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/FeedItemsDelete.php @@ -32,21 +32,21 @@ public function getFormID() { /** * Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion(). */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to remove all items from the feed %feed?', array('%feed' => $this->feed->label())); } /** * Implements \Drupal\Core\Form\ConfirmFormBase::getCancelPath(). */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/services/aggregator'; } /** * Implements \Drupal\Core\Form\ConfirmFormBase::getConfirmText(). */ - protected function getConfirmText() { + public function getConfirmText() { return t('Remove items'); } diff --git a/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php b/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php index 24655df..5ff2d90 100644 --- a/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php +++ b/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php @@ -53,21 +53,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to unblock %ip?', array('%ip' => $this->banIp)); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/people/ban'; } diff --git a/core/modules/block/lib/Drupal/block/Form/AdminBlockDeleteForm.php b/core/modules/block/lib/Drupal/block/Form/AdminBlockDeleteForm.php index ba6206a..bc34f4f 100644 --- a/core/modules/block/lib/Drupal/block/Form/AdminBlockDeleteForm.php +++ b/core/modules/block/lib/Drupal/block/Form/AdminBlockDeleteForm.php @@ -32,21 +32,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the block %name?', array('%name' => $this->block->label())); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/structure/block'; } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/contact/lib/Drupal/contact/Form/DeleteForm.php b/core/modules/contact/lib/Drupal/contact/Form/DeleteForm.php index 237d32e..82b0134 100644 --- a/core/modules/contact/lib/Drupal/contact/Form/DeleteForm.php +++ b/core/modules/contact/lib/Drupal/contact/Form/DeleteForm.php @@ -32,21 +32,21 @@ public function getFormID() { /** * Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion(). */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete %name?', array('%name' => $this->contactCategory->label())); } /** * Implements \Drupal\Core\Form\ConfirmFormBase::getCancelPath(). */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/structure/contact'; } /** * Overrides \Drupal\Core\Form\ConfirmFormBase::getConfirmText(). */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php index ec13c50..67c1d8c 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php @@ -61,21 +61,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the field %field?', array('%field' => $this->instance->label())); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return $this->entityManager->getAdminPath($this->instance->entity_type, $this->instance->bundle) . '/fields'; } diff --git a/core/modules/filter/lib/Drupal/filter/Form/DisableForm.php b/core/modules/filter/lib/Drupal/filter/Form/DisableForm.php index 49b71c8..8899eed 100644 --- a/core/modules/filter/lib/Drupal/filter/Form/DisableForm.php +++ b/core/modules/filter/lib/Drupal/filter/Form/DisableForm.php @@ -32,14 +32,14 @@ public function getFormID() { /** * Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion(). */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to disable the text format %format?', array('%format' => $this->format->name)); } /** * Implements \Drupal\Core\Form\ConfirmFormBase::getCancelPath(). */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/content/formats'; } diff --git a/core/modules/forum/lib/Drupal/forum/Form/DeleteForm.php b/core/modules/forum/lib/Drupal/forum/Form/DeleteForm.php index 46df2b9..69d301d 100644 --- a/core/modules/forum/lib/Drupal/forum/Form/DeleteForm.php +++ b/core/modules/forum/lib/Drupal/forum/Form/DeleteForm.php @@ -32,21 +32,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the forum %label?', array('%label' => $this->taxonomyTerm->label())); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/structure/forum'; } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.php b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.php index c3832c2..cd57de9 100644 --- a/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.php +++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.php @@ -32,21 +32,21 @@ class ImageEffectDeleteForm extends ConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the @effect effect from the %style style?', array('%style' => $this->imageStyle->label(), '@effect' => $this->imageEffect['label'])); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/media/image-styles/manage/' . $this->imageStyle->id(); } diff --git a/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.php b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.php index 9719d38..cf59650 100644 --- a/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.php +++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.php @@ -25,21 +25,21 @@ class ImageStyleDeleteForm extends ConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Optionally select a style before deleting %style', array('%style' => $this->imageStyle->label())); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/media/image-styles'; } @@ -53,7 +53,7 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getDescription() { + public function getDescription() { return t('If this style is in use on the site, you may select another style to replace it. All images that have been generated for this style will be permanently deleted.'); } diff --git a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteMenuForm.php b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteMenuForm.php index 84d0e90..a71a560 100644 --- a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteMenuForm.php +++ b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteMenuForm.php @@ -25,21 +25,21 @@ class MenuDeleteMenuForm extends ConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the custom menu %title?', array('%title' => $this->menu->label())); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/structure/menu/manage/' . $this->menu->id(); } /** * {@inheritdoc} */ - protected function getDescription() { + public function getDescription() { $caption = ''; $num_links = \Drupal::entityManager() ->getStorageController('menu_link')->countMenuLinks($this->menu->id()); @@ -53,7 +53,7 @@ protected function getDescription() { /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/menu/lib/Drupal/menu/Form/MenuLinkDeleteForm.php b/core/modules/menu/lib/Drupal/menu/Form/MenuLinkDeleteForm.php index e00dbc7..58a01db 100644 --- a/core/modules/menu/lib/Drupal/menu/Form/MenuLinkDeleteForm.php +++ b/core/modules/menu/lib/Drupal/menu/Form/MenuLinkDeleteForm.php @@ -25,14 +25,14 @@ class MenuLinkDeleteForm extends ConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the custom menu link %item?', array('%item' => $this->menuLink->link_title)); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/structure/menu/manage/' . $this->menuLink->menu_name; } diff --git a/core/modules/menu/lib/Drupal/menu/Form/MenuLinkResetForm.php b/core/modules/menu/lib/Drupal/menu/Form/MenuLinkResetForm.php index aa1165c..39b6510 100644 --- a/core/modules/menu/lib/Drupal/menu/Form/MenuLinkResetForm.php +++ b/core/modules/menu/lib/Drupal/menu/Form/MenuLinkResetForm.php @@ -25,28 +25,28 @@ class MenuLinkResetForm extends ConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to reset the link %item to its default values?', array('%item' => $this->menuLink->link_title)); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/structure/menu/manage/' . $this->menuLink->menu_name; } /** * {@inheritdoc} */ - protected function getDescription() { + public function getDescription() { return t('Any customizations will be lost. This action cannot be undone.'); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Reset'); } diff --git a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php index c11dbd8..5f1e208 100644 --- a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php +++ b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php @@ -73,21 +73,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return format_plural(count($this->nodes), 'Are you sure you want to delete this item?', 'Are you sure you want to delete these items?'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/content'; } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/path/lib/Drupal/path/Form/DeleteForm.php b/core/modules/path/lib/Drupal/path/Form/DeleteForm.php index 0eb9b88..39a4525 100644 --- a/core/modules/path/lib/Drupal/path/Form/DeleteForm.php +++ b/core/modules/path/lib/Drupal/path/Form/DeleteForm.php @@ -60,14 +60,14 @@ public function getFormID() { /** * Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion(). */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete path alias %title?', array('%title' => $this->pathAlias['alias'])); } /** * Implements \Drupal\Core\Form\ConfirmFormBase::getCancelPath(). */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/search/path'; } diff --git a/core/modules/picture/lib/Drupal/picture/Form/PictureMappingActionConfirmForm.php b/core/modules/picture/lib/Drupal/picture/Form/PictureMappingActionConfirmForm.php index 1038700..651f571 100644 --- a/core/modules/picture/lib/Drupal/picture/Form/PictureMappingActionConfirmForm.php +++ b/core/modules/picture/lib/Drupal/picture/Form/PictureMappingActionConfirmForm.php @@ -22,21 +22,21 @@ class PictureMappingActionConfirmForm extends ConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the picture_mapping %title?', array('%title' => $this->pictureMapping->label())); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/media/picturemapping'; } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Form/LinkDelete.php b/core/modules/shortcut/lib/Drupal/shortcut/Form/LinkDelete.php index e61713b..e905182 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Form/LinkDelete.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Form/LinkDelete.php @@ -32,21 +32,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the shortcut %title?', array('%title' => $this->menuLink->link_title)); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/user-interface/shortcut/manage/' . $this->menuLink->menu_name; } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Form/SetDelete.php b/core/modules/shortcut/lib/Drupal/shortcut/Form/SetDelete.php index 70e4e24..83afc23 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Form/SetDelete.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Form/SetDelete.php @@ -69,21 +69,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the shortcut set %title?', array('%title' => $this->shortcut->label())); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/user-interface/shortcut/manage/' . $this->shortcut->id(); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php b/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php index b56f3cf..844fb93 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php @@ -64,7 +64,7 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to remove the format %name : %format?', array( '%name' => $this->format['name'], '%format' => format_date(REQUEST_TIME, $this->formatID)) @@ -74,14 +74,14 @@ protected function getQuestion() { /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Remove'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/regional/date-time/formats'; } diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php b/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php index a3576c5..0008d0c 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php @@ -57,7 +57,7 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to reset the date formats for %language to the global defaults?', array( '%language' => $this->language->name, )); @@ -66,21 +66,21 @@ protected function getQuestion() { /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Reset'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/config/regional/date-time/locale'; } /** * {@inheritdoc} */ - protected function getDescription() { + public function getDescription() { return t('Resetting will remove all localized date formats for this language. This action cannot be undone.'); } diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesInstallConfirmForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesInstallConfirmForm.php index 2569161..82670de 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesInstallConfirmForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesInstallConfirmForm.php @@ -19,28 +19,28 @@ class ModulesInstallConfirmForm extends ConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Some required modules must be enabled'); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Continue'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/modules'; } /** * {@inheritdoc} */ - protected function getDescription() { + public function getDescription() { return t('Would you like to continue with the above?'); } diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php index f6a29cc..9d2d9d5 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php @@ -19,28 +19,28 @@ class ModulesUninstallConfirmForm extends ConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Confirm uninstall'); } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Uninstall'); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/modules/uninstall'; } /** * {@inheritdoc} */ - protected function getDescription() { + public function getDescription() { return t('Would you like to continue with uninstalling the above?'); } diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/ConfirmFormArrayPathTestForm.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/ConfirmFormArrayPathTestForm.php index f0210ae..186fc24 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/ConfirmFormArrayPathTestForm.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/ConfirmFormArrayPathTestForm.php @@ -22,7 +22,7 @@ public function getFormID() { /** * Overrides \Drupal\form_test\ConfirmFormTestForm::getCancelPath(). */ - protected function getCancelPath() { + public function getCancelPath() { return array( 'path' => 'admin', 'query' => array( @@ -34,7 +34,7 @@ protected function getCancelPath() { /** * Overrides \Drupal\form_test\ConfirmFormTestForm::getCancelText(). */ - protected function getCancelText() { + public function getCancelText() { return t('ConfirmFormArrayPathTestForm::getCancelText().'); } diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/ConfirmFormTestForm.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/ConfirmFormTestForm.php index eefa436..be45e67 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/ConfirmFormTestForm.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/ConfirmFormTestForm.php @@ -24,35 +24,35 @@ public function getFormID() { /** * Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion(). */ - protected function getQuestion() { + public function getQuestion() { return t('ConfirmFormTestForm::getQuestion().'); } /** * Implements \Drupal\Core\Form\ConfirmFormBase::getCancelPath(). */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin'; } /** * Overrides \Drupal\Core\Form\ConfirmFormBase::getDescription(). */ - protected function getDescription() { + public function getDescription() { return t('ConfirmFormTestForm::getDescription().'); } /** * Overrides \Drupal\Core\Form\ConfirmFormBase::getConfirmText(). */ - protected function getConfirmText() { + public function getConfirmText() { return t('ConfirmFormTestForm::getConfirmText().'); } /** * Overrides \Drupal\Core\Form\ConfirmFormBase::getCancelText(). */ - protected function getCancelText() { + public function getCancelText() { return t('ConfirmFormTestForm::getCancelText().'); } diff --git a/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php b/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php index 2108b92..ebdbfc4 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php +++ b/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php @@ -32,21 +32,21 @@ public function getFormID() { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the role %name?', array('%name' => $this->role->label())); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/people/roles'; } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); } diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php index 7dc1ee3..af9c554 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php @@ -74,14 +74,14 @@ public function getFormID() { /** * Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion(). */ - protected function getQuestion() { + public function getQuestion() { return t('Do you want to break the lock on view %name?', array('%name' => $this->view->id())); } /** * Implements \Drupal\Core\Form\ConfirmFormBase::getDescription(). */ - protected function getDescription() { + public function getDescription() { $locked = $this->tempStore->getMetadata($this->view->id()); $accounts = $this->entityManager->getStorageController('user')->load(array($locked->owner)); return t('By breaking this lock, any unsaved changes made by !user will be lost.', array('!user' => theme('username', array('account' => reset($accounts))))); @@ -90,14 +90,14 @@ protected function getDescription() { /** * Implements \Drupal\Core\Form\ConfirmFormBase::getCancelPath(). */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/structure/views/view/' . $this->view->id(); } /** * Implements \Drupal\Core\Form\ConfirmFormBase::getConfirmText(). */ - protected function getConfirmText() { + public function getConfirmText() { return t('Break lock'); } diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteFormController.php index d08d52b..18e81d0 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteFormController.php @@ -17,21 +17,21 @@ class ViewDeleteFormController extends EntityConfirmFormBase { /** * {@inheritdoc} */ - protected function getQuestion() { + public function getQuestion() { return t('Are you sure you want to delete the %name view?', array('%name' => $this->entity->label())); } /** * {@inheritdoc} */ - protected function getCancelPath() { + public function getCancelPath() { return 'admin/structure/views'; } /** * {@inheritdoc} */ - protected function getConfirmText() { + public function getConfirmText() { return t('Delete'); }