You are here

public function GroupContentEnablerManager::getPluginIdsByEntityTypeAccess in Group 8

Returns the ID of all plugins that define access for a given entity type.

Parameters

string $entity_type_id: The entity type ID.

Return value

string[] The plugin IDs.

Overrides GroupContentEnablerManagerInterface::getPluginIdsByEntityTypeAccess

File

src/Plugin/GroupContentEnablerManager.php, line 310

Class

GroupContentEnablerManager
Manages GroupContentEnabler plugin implementations.

Namespace

Drupal\group\Plugin

Code

public function getPluginIdsByEntityTypeAccess($entity_type_id) {
  $plugin_ids = [];
  foreach ($this
    ->getDefinitions() as $plugin_id => $plugin_info) {
    if (!empty($plugin_info['entity_access']) && $plugin_info['entity_type_id'] == $entity_type_id) {
      $plugin_ids[] = $plugin_id;
    }
  }
  return $plugin_ids;
}