You are here

public function FeaturesManager::detectMissing in Features 8.3

Same name and namespace in other branches
  1. 8.4 src/FeaturesManager.php \Drupal\features\FeaturesManager::detectMissing()

Determines which config is exported in the feature but not in the active.

Parameters

\Drupal\features\Package $feature: The package array.

Return value

array The array of config items that are missing from active store.

Overrides FeaturesManagerInterface::detectMissing

File

src/FeaturesManager.php, line 1326

Class

FeaturesManager
The FeaturesManager provides helper functions for building packages.

Namespace

Drupal\features

Code

public function detectMissing(Package $feature) {
  $config = $this
    ->getConfigCollection();
  $result = [];
  foreach ($feature
    ->getConfigOrig() as $name) {
    if (!isset($config[$name])) {
      $result[] = $name;
    }
  }
  return $result;
}