public function RabbitHoleEntityPluginManager::loadDefinitionsByEntityType in Rabbit Hole 8
Same name and namespace in other branches
- 2.x src/Plugin/RabbitHoleEntityPluginManager.php \Drupal\rabbit_hole\Plugin\RabbitHoleEntityPluginManager::loadDefinitionsByEntityType()
Load plugins implementing entity with id $entity_type.
Parameters
string $entity_type: The string ID of the entity type.
Return value
array An array of plugin definitions for the entity type with ID $entity_type.
1 call to RabbitHoleEntityPluginManager::loadDefinitionsByEntityType()
- RabbitHoleEntityPluginManager::createInstanceByEntityType in src/
Plugin/ RabbitHoleEntityPluginManager.php - Create an instance of the first plugin found with string id $entity_type.
File
- src/
Plugin/ RabbitHoleEntityPluginManager.php, line 75
Class
- RabbitHoleEntityPluginManager
- Provides the Rabbit hole entity plugin plugin manager.
Namespace
Drupal\rabbit_hole\PluginCode
public function loadDefinitionsByEntityType($entity_type) {
return array_filter($this
->getDefinitions(), function ($var) use ($entity_type) {
return $var['entityType'] == $entity_type;
});
}