You are here

public function FeaturesAssigner::applyBundle in Features 8.4

Same name and namespace in other branches
  1. 8.3 src/FeaturesAssigner.php \Drupal\features\FeaturesAssigner::applyBundle()

Makes the named bundle the current bundle.

Parameters

string $machine_name: The name of a features bundle. If omitted, gets the last bundle from the Session.

Return value

\Drupal\features\FeaturesBundleInterface A features bundle object.

Overrides FeaturesAssignerInterface::applyBundle

File

src/FeaturesAssigner.php, line 397

Class

FeaturesAssigner
Class responsible for performing package assignment.

Namespace

Drupal\features

Code

public function applyBundle($machine_name = NULL) {
  $this
    ->reset();
  $bundle = $this
    ->loadBundle($machine_name);
  if (isset($bundle)) {
    $this
      ->assignConfigPackages();
    return $this->currentBundle;
  }
  return NULL;
}