Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php \Drupal\Core\Block\MainContentBlockPluginInterface
  2. 9 core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php \Drupal\Core\Block\MainContentBlockPluginInterface

The interface for "main page content" blocks.

A main page content block represents the content returned by the controller.

Hierarchy

Expanded class hierarchy of MainContentBlockPluginInterface

All classes that implement MainContentBlockPluginInterface

Related topics

1 file declares its use of MainContentBlockPluginInterface
BlockViewBuilder.php in core/modules/block/src/BlockViewBuilder.php

File

core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php, line 12

Namespace

Drupal\Core\Block
View source
interface MainContentBlockPluginInterface extends BlockPluginInterface {

  /**
   * Sets the main content render array.
   *
   * @param array $main_content
   *   The render array representing the main content.
   */
  public function setMainContent(array $main_content);

}

Members

Name Modifierssort descending Type Description Overrides
BlockPluginInterface::BLOCK_LABEL_VISIBLE constant Indicates the block label (title) should be displayed to end users.
MainContentBlockPluginInterface::setMainContent public function Sets the main content render array.
BlockPluginInterface::label public function Returns the user-facing block label.
BlockPluginInterface::access public function Indicates whether the block should be shown.
BlockPluginInterface::build public function Builds and returns the renderable array for this block plugin. 3
BlockPluginInterface::setConfigurationValue public function Sets a particular value in the block settings.
BlockPluginInterface::blockForm public function Returns the configuration form elements specific to this block plugin.
BlockPluginInterface::blockValidate public function Adds block type-specific validation for the block form.
BlockPluginInterface::blockSubmit public function Adds block type-specific submission handling for the block form.
BlockPluginInterface::getMachineNameSuggestion public function Suggests a machine name to identify an instance of this block.
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 13
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 13
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 23
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 15
PluginFormInterface::buildConfigurationForm public function Form constructor. 28
PluginFormInterface::validateConfigurationForm public function Form validation handler. 26
PluginFormInterface::submitConfigurationForm public function Form submission handler. 27
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 12
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. 12
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 12
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1