class SystemMainBlock
Same name and namespace in other branches
- 11.x core/modules/system/src/Plugin/Block/SystemMainBlock.php \Drupal\system\Plugin\Block\SystemMainBlock
- 10 core/modules/system/src/Plugin/Block/SystemMainBlock.php \Drupal\system\Plugin\Block\SystemMainBlock
- 8.9.x core/modules/system/src/Plugin/Block/SystemMainBlock.php \Drupal\system\Plugin\Block\SystemMainBlock
Provides a 'Main page content' block.
Plugin annotation
@Block(
id = "system_main_block",
admin_label = @Translation("Main page content"),
forms = {
"settings_tray" = FALSE,
},
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\Core\Block\BlockBase extends \Drupal\Core\Block\BlockPluginInterface, \Drupal\Core\Plugin\PluginWithFormsInterface, \Drupal\Core\Plugin\PreviewAwarePluginInterface, \Drupal\Core\Render\PreviewFallbackInterface, \Drupal\Core\Plugin\ContextAwarePluginInterface uses \Drupal\Core\Block\BlockPluginTrait, \Drupal\Core\Plugin\ContextAwarePluginTrait, \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\system\Plugin\Block\SystemMainBlock extends \Drupal\Core\Block\MainContentBlockPluginInterface implements \Drupal\Core\Block\BlockBase
- class \Drupal\Core\Block\BlockBase extends \Drupal\Core\Block\BlockPluginInterface, \Drupal\Core\Plugin\PluginWithFormsInterface, \Drupal\Core\Plugin\PreviewAwarePluginInterface, \Drupal\Core\Render\PreviewFallbackInterface, \Drupal\Core\Plugin\ContextAwarePluginInterface uses \Drupal\Core\Block\BlockPluginTrait, \Drupal\Core\Plugin\ContextAwarePluginTrait, \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of SystemMainBlock
File
-
core/
modules/ system/ src/ Plugin/ Block/ SystemMainBlock.php, line 19
Namespace
Drupal\system\Plugin\BlockView source
class SystemMainBlock extends BlockBase implements MainContentBlockPluginInterface {
/**
* The render array representing the main page content.
*
* @var array
*/
protected $mainContent;
/**
* {@inheritdoc}
*/
public function setMainContent(array $main_content) {
$this->mainContent = $main_content;
}
/**
* {@inheritdoc}
*/
public function build() {
return $this->mainContent;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.