You are here

public function ModifiableServiceBaseTrait::getPluginsAvailable in Purge 8.3

Retrieve the plugin IDs of plugins that can be enabled.

See also

\Drupal\purge\ModifiableServiceInterface::getPluginsAvailable()

File

src/ModifiableServiceBaseTrait.php, line 15

Class

ModifiableServiceBaseTrait
Adds implementations to \Drupal\purge\ModifiableServiceInterface derivatives.

Namespace

Drupal\purge

Code

public function getPluginsAvailable() {
  $enabled = $this
    ->getPluginsEnabled();
  $available = [];
  foreach ($this
    ->getPlugins() as $plugin_id => $definition) {
    if (!in_array($plugin_id, $enabled)) {
      $available[] = $plugin_id;
    }
  }
  return $available;
}