You are here

public function Feature::getConfigurationByType in Configuration selector 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Feature.php \Drupal\config_selector\Entity\Feature::getConfigurationByType()

Gets the feature's configuration entities of the specified type.

Parameters

string $entity_type_id: The entity type of the returned configuration entities.

Return value

\Drupal\Core\Config\Entity\ConfigEntityInterface[] The feature's configuration entities of the specified type. Keyed by their ID.

Overrides FeatureInterface::getConfigurationByType

1 call to Feature::getConfigurationByType()
Feature::getConfiguration in src/Entity/Feature.php
Gets the all feature's configuration entities.

File

src/Entity/Feature.php, line 95

Class

Feature
Defines the Configuration Selector feature configuration entity.

Namespace

Drupal\config_selector\Entity

Code

public function getConfigurationByType($entity_type_id) {
  $entity_storage = $this
    ->entityTypeManager()
    ->getStorage($entity_type_id);
  $result = $entity_storage
    ->getQuery()
    ->condition('third_party_settings.config_selector.feature', $this
    ->id())
    ->execute();
  if (!empty($result)) {

    // Convert the result to entities.
    $result = $entity_storage
      ->loadMultiple($result);
  }
  return $result;
}