You are here

public function SchedulerManager::getPluginDefinitions in Scheduler 2.x

Get a list of all scheduler plugin definitions.

Return value

array|mixed[]|null A list of definitions for the registered scheduler plugins.

1 call to SchedulerManager::getPluginDefinitions()
SchedulerManager::getPlugins in src/SchedulerManager.php
Gets instances of applicable Scheduler plugins for the enabled modules.

File

src/SchedulerManager.php, line 870

Class

SchedulerManager
Defines a scheduler manager.

Namespace

Drupal\scheduler

Code

public function getPluginDefinitions() {
  $plugin_definitions = $this->pluginManager
    ->getDefinitions();

  // Sort in reverse order so that we have 'node_scheduler' followed by
  // 'media_scheduler'. When a third entity type plugin gets implemented it
  // would be possible to add a 'weight' property and sort by that.
  arsort($plugin_definitions);
  return $plugin_definitions;
}