You are here

public function ActionLinkPluginManager::getAllLinkTypes in Flag 8.4

Get an array of all link type labels keyed by plugin ID.

Return value

array An array of all link type plugins.

File

src/ActionLink/ActionLinkPluginManager.php, line 31

Class

ActionLinkPluginManager
Plugin manager for link types.

Namespace

Drupal\flag\ActionLink

Code

public function getAllLinkTypes() {
  $link_types = [];
  foreach ($this
    ->getDefinitions() as $plugin_id => $plugin_def) {
    $link_types[$plugin_id] = $plugin_def['label'];
  }
  return $link_types;
}