You are here

public function SchedulerManager::getPlugin in Scheduler 2.x

Get a plugin for a specific entity type.

Parameters

string $entity_type: The entity type.

Return value

mixed The plugin object associated with a specific entity, or NULL if none.

2 calls to SchedulerManager::getPlugin()
SchedulerManager::getEnabledTypes in src/SchedulerManager.php
Gets the names of the types/bundles enabled for a specific process.
SchedulerManager::throwSchedulerException in src/SchedulerManager.php
Handles throwing exceptions.

File

src/SchedulerManager.php, line 948

Class

SchedulerManager
Defines a scheduler manager.

Namespace

Drupal\scheduler

Code

public function getPlugin($entity_type) {
  $plugins = $this
    ->getPlugins();
  return $plugins[$entity_type] ?? NULL;
}