You are here

public function PluginCollectionItem::getPluginType in Plugin 8.2

Returns the type of the plugins contained by this item.

Return value

\Drupal\plugin\PluginType\PluginTypeInterface

Overrides PluginCollectionItemInterface::getPluginType

File

src/Plugin/Field/FieldType/PluginCollectionItem.php, line 23

Class

PluginCollectionItem
Provides a plugin collection field.

Namespace

Drupal\plugin\Plugin\Field\FieldType

Code

public function getPluginType() {

  /** @var \Drupal\plugin\PluginType\PluginTypeManagerInterface $plugin_type_manager */
  $plugin_type_manager = \Drupal::service('plugin.plugin_type_manager');
  return $plugin_type_manager
    ->getPluginType($this
    ->getPluginDefinition()['plugin_type_id']);
}