You are here

public function Flag::setlinkTypePlugin in Flag 8.4

Set the link type plugin.

Parameters

string $plugin_id: A string containing the link type plugin ID.

Overrides FlagInterface::setlinkTypePlugin

File

src/Entity/Flag.php, line 320

Class

Flag
Provides the Flag configuration entity.

Namespace

Drupal\flag\Entity

Code

public function setlinkTypePlugin($plugin_id) {
  $this->link_type = $plugin_id;

  // $this->linkTypeBag->addInstanceId($pluginID);
  // Workaround for https://www.drupal.org/node/2288805
  $this->linkTypeCollection = new DefaultSingleLazyPluginCollection(\Drupal::service('plugin.manager.flag.linktype'), $this->link_type, $this->linkTypeConfig);
}