BlockInterface::BLOCK_REGION_NONE

Denotes that a block is not enabled in any region and should not be shown. File core/modules/block/src/BlockInterface.php, line 20 Class BlockInterface Provides an interface defining a block entity. Namespace Drupal\block Code const BLOCK_REGION_NONE = -1;

BlockInterface::BLOCK_LABEL_VISIBLE

Indicates the block label (title) should be displayed to end users. File core/modules/block/src/BlockInterface.php, line 15 Class BlockInterface Provides an interface defining a block entity. Namespace Drupal\block Code const BLOCK_LABEL_VISIBLE = 'visible';

BlockInterface

Provides an interface defining a block entity. Hierarchy interface \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterfaceinterface \Drupal\Core\Config\Entity\ConfigEntityInterfaceinterface \Drupal\block\BlockInterface File core/modules/block/src/BlockInterface.php, line 10 Namespace Drupal\block Members Name Modifiers Type Description AccessibleInterface::access public function Checks data value access. BlockInterface::B

BlockForm::__construct

public BlockForm::__construct(EntityManagerInterface $entity_manager, ExecutableManagerInterface $manager, ContextRepositoryInterface $context_repository, LanguageManagerInterface $language, ThemeHandlerInterface $theme_handler, PluginFormFactoryInterface $plugin_form_manager) Constructs a BlockForm object. Parameters \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager. \Drupal\Core\Executable\ExecutableManagerInterface $manager: The ConditionManager for building the

BlockForm::validateVisibility

protected BlockForm::validateVisibility(array $form, FormStateInterface $form_state) Helper function to independently validate the visibility UI. Parameters array $form: A nested array form elements comprising the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. File core/modules/block/src/BlockForm.php, line 319 Class BlockForm Provides form for block instance forms. Namespace Drupal\block Code protected function validateVisibility(array $form, F

BlockForm::validateForm

public BlockForm::validateForm(array &$form, FormStateInterface $form_state) Form validation handler. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides FormBase::validateForm File core/modules/block/src/BlockForm.php, line 301 Class BlockForm Provides form for block instance forms. Namespace Drupal\block Code public function validateForm(array &$form, For

BlockForm::themeSwitch

public BlockForm::themeSwitch($form, FormStateInterface $form_state) Handles switching the available regions based on the selected theme. File core/modules/block/src/BlockForm.php, line 210 Class BlockForm Provides form for block instance forms. Namespace Drupal\block Code public function themeSwitch($form, FormStateInterface $form_state) { $form['region']['#options'] = system_region_list($form_state->getValue('theme'), REGIONS_VISIBLE); return $form['region']; }

BlockForm::submitVisibility

protected BlockForm::submitVisibility(array $form, FormStateInterface $form_state) Helper function to independently submit the visibility UI. Parameters array $form: A nested array form elements comprising the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. File core/modules/block/src/BlockForm.php, line 377 Class BlockForm Provides form for block instance forms. Namespace Drupal\block Code protected function submitVisibility(array $form, FormSta

BlockForm::submitForm

public BlockForm::submitForm(array &$form, FormStateInterface $form_state) This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state can be updated, this way the subsequently invoked handlers can retrieve a regular entity object to act on. Generally this method should not be overridden unless the ent

BlockForm::getUniqueMachineName

public BlockForm::getUniqueMachineName(BlockInterface $block) Generates a unique machine name for a block. Parameters \Drupal\block\BlockInterface $block: The block entity. Return value string Returns the unique name. File core/modules/block/src/BlockForm.php, line 408 Class BlockForm Provides form for block instance forms. Namespace Drupal\block Code public function getUniqueMachineName(BlockInterface $block) { $suggestion = $block->getPlugin()->getMachineNameSuggestion();