You are here

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

Parameters

string $fieldblock_id: The identifier of the fieldblock.

Return value

mixed[]|false The render array of the field that is published as block or false if the field is not available.

File

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

Class

FieldBlock
Provides a fieldblock.

Namespace

Drupal\fieldblock\Plugin\Block

Code

public static function getFieldBlock($fieldblock_id) {
  if (isset(self::$fieldBlocks[$fieldblock_id])) {
    return self::$fieldBlocks[$fieldblock_id];
  }
  else {
    return FALSE;
  }
}