Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TitleBlockPluginInterface.php

interface TitleBlockPluginInterface

The interface for "title" blocks.

A title block shows the title returned by the controller.

Hierarchy

  • interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Cache\CacheableDependencyInterface; interface \Drupal\Core\Plugin\PluginFormInterface
    • interface \Drupal\Core\Block\BlockPluginInterface extends \Drupal\Component\Plugin\ConfigurableInterface \Drupal\Component\Plugin\DependentPluginInterface \Drupal\Core\Plugin\PluginFormInterface \Drupal\Component\Plugin\PluginInspectionInterface \Drupal\Core\Cache\CacheableDependencyInterface \Drupal\Component\Plugin\DerivativeInspectionInterface
      • interface \Drupal\Core\Block\TitleBlockPluginInterface extends \Drupal\Core\Block\BlockPluginInterface

Expanded class hierarchy of TitleBlockPluginInterface

All classes that implement TitleBlockPluginInterface

See also

\Drupal\Core\Render\Element\PageTitle

Related topics

Block API
Information about the classes and interfaces that make up the Block API.
3 files declare their use of TitleBlockPluginInterface
BlockPageVariant.php in core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php
BlockViewBuilder.php in core/modules/block/src/BlockViewBuilder.php
PageTitleBlock.php in core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php

File

core/lib/Drupal/Core/Block/TitleBlockPluginInterface.php, line 14

Namespace

Drupal\Core\Block
View source
interface TitleBlockPluginInterface extends BlockPluginInterface {
    
    /**
     * Sets the title.
     *
     * @param string|array $title
     *   The page title: either a string for plain titles or a render array for
     *   formatted titles.
     */
    public function setTitle($title);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
BlockPluginInterface::access public function Indicates whether the block should be shown.
BlockPluginInterface::blockForm public function Returns the configuration form elements specific to this block plugin.
BlockPluginInterface::blockSubmit public function Adds block type-specific submission handling for the block form.
BlockPluginInterface::blockValidate public function Adds block type-specific validation for the block form.
BlockPluginInterface::BLOCK_LABEL_VISIBLE constant Indicates the block label (title) should be displayed to end users.
BlockPluginInterface::build public function Builds and returns the renderable array for this block plugin. 27
BlockPluginInterface::getMachineNameSuggestion public function Suggests a machine name to identify an instance of this block.
BlockPluginInterface::label public function Returns the user-facing block label.
BlockPluginInterface::setConfigurationValue public function Sets a particular value in the block settings.
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 30
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 30
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. 23
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 10
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 10
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 10
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 18
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
PluginFormInterface::buildConfigurationForm public function Form constructor. 20
PluginFormInterface::submitConfigurationForm public function Form submission handler. 20
PluginFormInterface::validateConfigurationForm public function Form validation handler. 15
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 5
PluginInspectionInterface::getPluginId public function Gets the plugin ID of the plugin instance. 2
TitleBlockPluginInterface::setTitle public function Sets the title. 1
RSS feed
Powered by Drupal