You are here

public function FeaturesAssigner::getBundle in Features 8.4

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

Returns a FeaturesBundle object.

Parameters

string $name: machine name of package set. If omitted, returns the current bundle.

Return value

\Drupal\features\FeaturesBundleInterface A features bundle object.

Overrides FeaturesAssignerInterface::getBundle

6 calls to FeaturesAssigner::getBundle()
FeaturesAssigner::createBundleFromDefault in src/FeaturesAssigner.php
Creates a new bundle by duplicating the default bundle and customizing.
FeaturesAssigner::findBundle in src/FeaturesAssigner.php
Searches for a bundle that matches the $info.yml or $features.yml export.
FeaturesAssigner::loadBundle in src/FeaturesAssigner.php
Loads a named bundle.
FeaturesAssigner::removeBundle in src/FeaturesAssigner.php
FeaturesAssigner::renameBundle in src/FeaturesAssigner.php
Renames a bundle.

... See full list

File

src/FeaturesAssigner.php, line 219

Class

FeaturesAssigner
Class responsible for performing package assignment.

Namespace

Drupal\features

Code

public function getBundle($name = NULL) {
  if (empty($name)) {
    return $this->currentBundle;
  }
  elseif (isset($this->bundles[$name])) {
    return $this->bundles[$name];
  }
  return NULL;
}