diff --git a/core/modules/block/lib/Drupal/block/BlockInterface.php b/core/modules/block/lib/Drupal/block/BlockInterface.php index 601034a..b6a50b0 100644 --- a/core/modules/block/lib/Drupal/block/BlockInterface.php +++ b/core/modules/block/lib/Drupal/block/BlockInterface.php @@ -8,30 +8,41 @@ interface BlockInterface { /** - * The default settings for the block. + * Returns the default settings for this block plugin. * - * @return array(). + * @return array */ public function settings(); /** - * An access wrapper method. + * Indicates whether the block should be shown, based on general criteria. * - * @return bool. + * This method should enforce the general contracts that are generally + * applicable to all blocks: role, path, and page-based visibility settings. + * + * This is the method that is typically called externally, so implementations + * of it should make sure to also call BlockInterface::access() and AND the + * result with their own result to provide the final access determination. + * + * @return bool */ public function accessWrapper(); /** - * A simple access method. + * Indicates whether the block should be shown, based on internal criteria. * - * @return bool. + * Blocks with access control that should *always* be applied, regardless of + * user-configured settings, should implement this method with that access + * control logic. + * + * @return bool */ public function access(); /** - * The configuration wrapper form for the block. + * Returns the configuration form elements specific to this block plugin. * - * @return form array(). + * @return array $form */ public function configure($form, &$form_state); @@ -46,9 +57,12 @@ public function configureValidate($form, &$form_state); public function configureSubmit($form, &$form_state); /** - * The configuration form for the block. + * Returns the full form for block configuration. + * + * This incorporates both * - * @return form array(). + * @return array $form + * The renderable form array representing the entire configuration form. */ public function configureWrapper($form, &$form_state); @@ -63,10 +77,10 @@ public function configureValidateWrapper($form, &$form_state); public function configureSubmitWrapper($form, &$form_state); /** - * A function for building renderable block arrays. A block theme wrapper - * will be wrapped around this by the caller. + * Builds and returns the renderable array for this block. * - * @return renderable array(). + * @return array + * A renderable array representing the output of the block. */ public function build(); }