You are here

protected function ExtraFieldBlockPlugin::getBlockTypeInstance in Entity Extra Field 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/ExtraFieldType/ExtraFieldBlockPlugin.php \Drupal\entity_extra_field\Plugin\ExtraFieldType\ExtraFieldBlockPlugin::getBlockTypeInstance()

Get block type instance.

Return value

\Drupal\Core\Block\BlockPluginInterface The block instance; otherwise FALSE if type is not defined.

Throws

\Drupal\Component\Plugin\Exception\PluginException

4 calls to ExtraFieldBlockPlugin::getBlockTypeInstance()
ExtraFieldBlockPlugin::build in src/Plugin/ExtraFieldType/ExtraFieldBlockPlugin.php
Build the render array of the extra field type contents.
ExtraFieldBlockPlugin::calculateDependencies in src/Plugin/ExtraFieldType/ExtraFieldBlockPlugin.php
Calculates dependencies for the configured plugin.
ExtraFieldBlockPlugin::submitConfigurationForm in src/Plugin/ExtraFieldType/ExtraFieldBlockPlugin.php
Form submission handler.
ExtraFieldBlockPlugin::validateConfigurationForm in src/Plugin/ExtraFieldType/ExtraFieldBlockPlugin.php
Form validation handler.

File

src/Plugin/ExtraFieldType/ExtraFieldBlockPlugin.php, line 321

Class

ExtraFieldBlockPlugin
Define extra field block type.

Namespace

Drupal\entity_extra_field\Plugin\ExtraFieldType

Code

protected function getBlockTypeInstance() : BlockPluginInterface {
  $config = $this
    ->getConfiguration();
  return $this->blockManager
    ->createInstance($config['block_type'], $config['block_config']);
}