diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 24633c0..b2fb291 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -115,7 +115,7 @@ public function blockAccess() { * @see hook_block_access() * @see \Drupal\block\BlockBase::blockAccess() */ - public function access($entity) { + public function access(Block $entity) { // If the block-specific access restrictions indicate the block is not // accessible, always deny access. if (!$this->blockAccess()) { @@ -205,7 +205,7 @@ public function access($entity) { * * @see \Drupal\block\BlockBase::blockForm() */ - public function form($form, &$form_state, $entity) { + public function form($form, &$form_state, Block $entity) { $definition = $this->getDefinition(); $form['id'] = array( '#type' => 'value', diff --git a/core/modules/block/lib/Drupal/block/BlockInterface.php b/core/modules/block/lib/Drupal/block/BlockInterface.php index 8f267d2..4707b9b 100644 --- a/core/modules/block/lib/Drupal/block/BlockInterface.php +++ b/core/modules/block/lib/Drupal/block/BlockInterface.php @@ -39,12 +39,15 @@ public function blockSettings(); * This method allows base implementations to add general access restrictions * that should apply to all extending block plugins. * + * @param \Drupal\block\Plugin\Core\Entity\Block $entity + * The block entity. + * * @return bool * TRUE if the block should be shown, or FALSE otherwise. * * @see \Drupal\block\BlockAccessController */ - public function access($entity); + public function access(Block $entity); /** * Constructs the block configuration form. @@ -56,6 +59,8 @@ public function access($entity); * The form definition array for the block configuration form. * @param array $form_state * An array containing the current state of the configuration form. + * @param \Drupal\block\Plugin\Core\Entity\Block $entity + * The block entity. * * @return array $form * The renderable form array representing the entire configuration form. @@ -64,7 +69,7 @@ public function access($entity); * @see \Drupal\block\BlockInterace::validate() * @see \Drupal\block\BlockInterace::submit() */ - public function form($form, &$form_state, $entity); + public function form($form, &$form_state, Block $entity); /** * Handles form validation for the block configuration form.