You are here

public static function FieldBlock::setFieldBlock in Field as Block 8

Parameters

string $fieldblock_id: The identifier of the fieldblock.

mixed[] $render_array: The render array of the field that will be published as block.

1 call to FieldBlock::setFieldBlock()
FieldBlock::fieldBlockPostRenderCache in src/Plugin/Block/FieldBlock.php
#post_render_cache callback, temporarily stores a field's render array in a static variable and returns the original element as post render cache callbacks are supposed to do.

File

src/Plugin/Block/FieldBlock.php, line 60
Contains \Drupal\fieldblock\Plugin\Block\FieldBlock.

Class

FieldBlock
Provides a fieldblock.

Namespace

Drupal\fieldblock\Plugin\Block

Code

public static function setFieldBlock($fieldblock_id, array $render_array) {
  self::$fieldBlocks[$fieldblock_id] = $render_array;
}