You are here

trait ModifiableServiceBaseTrait in Purge 8.3

Adds implementations to \Drupal\purge\ModifiableServiceInterface derivatives.

Hierarchy

3 files declare their use of ModifiableServiceBaseTrait
ProcessorsService.php in src/Plugin/Purge/Processor/ProcessorsService.php
QueuersService.php in src/Plugin/Purge/Queuer/QueuersService.php
QueueService.php in src/Plugin/Purge/Queue/QueueService.php

File

src/ModifiableServiceBaseTrait.php, line 8

Namespace

Drupal\purge
View source
trait ModifiableServiceBaseTrait {

  /**
   * Retrieve the plugin IDs of plugins that can be enabled.
   *
   * @see \Drupal\purge\ModifiableServiceInterface::getPluginsAvailable()
   */
  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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ModifiableServiceBaseTrait::getPluginsAvailable public function Retrieve the plugin IDs of plugins that can be enabled.