block_content.module

Allows the creation of custom blocks through the user interface. File core/modules/block_content/block_content.module Functions Name Description block_content_add_body_field Adds the default body field to a custom block type. block_content_entity_type_alter Implements hook_entity_type_alter(). block_content_help Implements hook_help(). block_content_theme Implements hook_theme().

block_content.install

Install, update and uninstall functions for the block_content module. File core/modules/block_content/block_content.install Functions Name Description block_content_update_8001 Add 'revision_translation_affected' field to 'block_content' entities. block_content_update_8002 Generalizes the d6_block_content_type and d6_block_content_body_field migrations. block_content_update_8003 Add 'revision_created' and 'revision_user' fields to 'block_content' entities.

block_content_help

block_content_help($route_name, RouteMatchInterface $route_match) Implements hook_help(). File core/modules/block_content/block_content.module, line 15 Allows the creation of custom blocks through the user interface. Code function block_content_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.block_content': $field_ui = \Drupal::moduleHandler()->moduleExists('field_ui') ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#'

block_content_entity_type_alter

block_content_entity_type_alter(array &$entity_types) Implements hook_entity_type_alter(). File core/modules/block_content/block_content.module, line 57 Allows the creation of custom blocks through the user interface. Code function block_content_entity_type_alter(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ // Add a translation handler for fields if the language module is enabled. if (\Drupal::moduleHandler()->moduleExists('langu

block_content.pages.inc

Provides page callbacks for custom blocks. File core/modules/block_content/block_content.pages.inc Functions Name Description template_preprocess_block_content_add_list Prepares variables for a custom block type creation list templates.

BlockViewBuilder::preRender

public static BlockViewBuilder::preRender($build) #pre_render callback for building a block. Renders the content using the provided block plugin, and then: if there is no content, aborts rendering, and makes sure the block won't be rendered. if there is content, moves the contextual links from the block content to the block itself. File core/modules/block/src/BlockViewBuilder.php, line 202 Class BlockViewBuilder Provides a Block view builder. Namespace Drupal\block Code public stati

block_configurable_language_delete

block_configurable_language_delete(ConfigurableLanguageInterface $language) Implements hook_ENTITY_TYPE_delete() for 'configurable_language'. Delete the potential block visibility settings of the deleted language. File core/modules/block/block.module, line 275 Controls the visual building blocks a page is constructed with. Code function block_configurable_language_delete(ConfigurableLanguageInterface $language) { // Remove the block visibility settings for the deleted language. foreach (B

BlockViewBuilder::__construct

public BlockViewBuilder::__construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler) Constructs a new BlockViewBuilder. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition. \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service. \Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

BlockViewBuilder::viewMultiple

public BlockViewBuilder::viewMultiple(array $entities = array(), $view_mode = 'full', $langcode = NULL) Builds the render array for the provided entities. Parameters array $entities: An array of entities implementing EntityInterface to view. string $view_mode: (optional) The view mode that should be used to render the entity. string $langcode: (optional) For which language the entity should be rendered, defaults to the current content language. Return value A render array for the entities, in

BlockViewBuilder::lazyBuilder

public static BlockViewBuilder::lazyBuilder($entity_id, $view_mode) #lazy_builder callback; builds a #pre_render-able block. Parameters $entity_id: A block config entity ID. $view_mode: The view mode the block is being viewed in. Return value array A render array with a #pre_render callback to render the block. File core/modules/block/src/BlockViewBuilder.php, line 189 Class BlockViewBuilder Provides a Block view builder. Namespace Drupal\block Code public static function lazyBuilder