You are here

public function DefaultPluginTypeOperationsProvider::getOperations in Plugin 8.2

Gets plugin operations.

Parameters

string $plugin_type_id: The ID of the plugin type the operations are for.

Return value

array[] An array with the same structure as \Drupal\Core\Entity\EntityListBuilderInterface::getOperations()' return value.

Overrides PluginTypeOperationsProviderInterface::getOperations

File

src/PluginType/DefaultPluginTypeOperationsProvider.php, line 40

Class

DefaultPluginTypeOperationsProvider
Provides default operations for plugin types.

Namespace

Drupal\plugin\PluginType

Code

public function getOperations($plugin_type_id) {
  $operations['list'] = [
    'title' => $this
      ->t('View'),
    'url' => new Url('plugin.plugin.list', [
      'plugin_type' => $plugin_type_id,
    ]),
  ];
  return $operations;
}