class ComponentConfigResolver

Resolves Rules component configs.

Hierarchy

Expanded class hierarchy of ComponentConfigResolver

1 string reference to 'ComponentConfigResolver'
rules.services.yml in ./rules.services.yml
rules.services.yml
1 service uses ComponentConfigResolver
rules.component_resolver.component_config in ./rules.services.yml
Drupal\rules\ComponentResolver\ComponentConfigResolver

File

src/ComponentResolver/ComponentConfigResolver.php, line 12

Namespace

Drupal\rules\ComponentResolver
View source
class ComponentConfigResolver implements RulesComponentResolverInterface {
    
    /**
     * The rules component entity storage.
     *
     * @var \Drupal\Core\Entity\EntityStorageInterface
     */
    protected $entityStorage;
    
    /**
     * Constructs the object.
     *
     * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
     *   The entity type manager.
     */
    public function __construct(EntityTypeManagerInterface $entity_type_manager) {
        $this->entityStorage = $entity_type_manager->getStorage('rules_component');
    }
    
    /**
     * {@inheritdoc}
     */
    public function getMultiple(array $ids) {
        return array_map(function (RulesComponentConfig $config) {
            return $config->getComponent();
        }, $this->entityStorage
            ->loadMultiple($ids));
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ComponentConfigResolver::$entityStorage protected property The rules component entity storage.
ComponentConfigResolver::getMultiple public function Gets multiple components. Overrides RulesComponentResolverInterface::getMultiple
ComponentConfigResolver::__construct public function Constructs the object.