diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php index 4d77665..19c547d 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php @@ -38,7 +38,6 @@ class CustomBlockFormController extends EntityFormControllerNG implements Contro * The language manager. */ public function __construct(EntityStorageControllerInterface $custom_block_storage, LanguageManager $language_manager) { - $this->customBlockStorage = $custom_block_storage; $this->languageManager = $language_manager; } @@ -81,7 +80,7 @@ public function form(array $form, array &$form_state) { if ($this->operation == 'edit') { // @todo Remove this once https://drupal.org/node/1981644 is in. - drupal_set_title($this->t('Edit custom block %label', array('%label' => $block->label())), PASS_THROUGH); + $form['#title'] = $this->t('Edit custom block %label', array('%label' => $block->label())); } // Override the default CSS class name, since the user-defined custom block // type name in 'TYPE-block-form' potentially clashes with third-party class diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockDeleteForm.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockDeleteForm.php index 0cc6f05..df5265f 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockDeleteForm.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockDeleteForm.php @@ -39,8 +39,8 @@ public function getConfirmText() { /** * {@inheritdoc} */ - public function buildForm(array $form, array &$form_state, Request $request = NULL) { - $form = parent::buildForm($form, $form_state, $request); + public function buildForm(array $form, array &$form_state) { + $form = parent::buildForm($form, $form_state); $instances = $this->entity->getInstances(); $form['message'] = array( diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php index eac3ab6..d4ee2ce 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php @@ -46,7 +46,7 @@ public static function create(ContainerInterface $container) { * {@inheritdoc} */ public function getQuestion() { - return t('Are you sure you want to delete %label?', array('%label' => $this->entity->label())); + return $this->t('Are you sure you want to delete %label?', array('%label' => $this->entity->label())); } /** @@ -60,7 +60,7 @@ public function getCancelPath() { * {@inheritdoc} */ public function getConfirmText() { - return t('Delete'); + return $this->t('Delete'); } /** @@ -84,7 +84,7 @@ public function buildForm(array $form, array &$form_state) { public function submit(array $form, array &$form_state) { $this->entity->delete(); $form_state['redirect'] = 'admin/structure/custom-blocks/types'; - drupal_set_message(t('Custom block type %label has been deleted.', array('%label' => $this->entity->label()))); + drupal_set_message($this->t('Custom block type %label has been deleted.', array('%label' => $this->entity->label()))); watchdog('custom_block', 'Custom block type %label has been deleted.', array('%label' => $this->entity->label()), WATCHDOG_NOTICE); }