You are here

public function Feature::getConfiguration in Configuration selector 8.2

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

Gets the all feature's configuration entities.

Return value

array The arrays of configuration entity objects keyed by their entity type ID.

Overrides FeatureInterface::getConfiguration

File

src/Entity/Feature.php, line 78

Class

Feature
Defines the Configuration Selector feature configuration entity.

Namespace

Drupal\config_selector\Entity

Code

public function getConfiguration() {
  $configuration = [];
  foreach ($this
    ->entityTypeManager()
    ->getDefinitions() as $entity_type) {
    if ($entity_type instanceof ConfigEntityTypeInterface) {
      $result = $this
        ->getConfigurationByType($entity_type
        ->id());
      if (!empty($result)) {
        $configuration[$entity_type
          ->id()] = $result;
      }
    }
  }
  return $configuration;
}