You are here

public function PluginCollectionItemBase::setContainedPluginId in Plugin 8.2

Sets the plugin ID.

Parameters

string $plugin_id:

Return value

$this

Overrides PluginCollectionItemInterface::setContainedPluginId

Deprecated

Deprecated as of 8.x-2.0 and scheduled for removal before 8.x-3.0. Use static::setContainedPluginInstance().

1 call to PluginCollectionItemBase::setContainedPluginId()
PluginCollectionItemBase::setValue in src/Plugin/Field/FieldType/PluginCollectionItemBase.php
Sets the data value.

File

src/Plugin/Field/FieldType/PluginCollectionItemBase.php, line 92

Class

PluginCollectionItemBase
Provides a base for plugin collection field items.

Namespace

Drupal\plugin\Plugin\Field\FieldType

Code

public function setContainedPluginId($plugin_id) {
  $this
    ->get('plugin_id')
    ->setValue($plugin_id);
  return $this;
}