You are here

public function Package::getRequiredAll in Features 8.3

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

Return value

bool

File

src/Package.php, line 289

Class

Package
Defines a value object for storing package related data.

Namespace

Drupal\features

Code

public function getRequiredAll() {

  // Mark all as required if the package is not yet exported.
  if ($this
    ->getStatus() === FeaturesManagerInterface::STATUS_NO_EXPORT) {
    return TRUE;
  }

  // Mark all as required if required is TRUE.
  if (is_bool($this->required)) {
    return $this->required;
  }

  // Mark all as required if required contains all the exported config.
  $config_orig = $this
    ->getConfigOrig();
  $diff = array_diff($config_orig, $this->required);
  return empty($diff);
}