Loading src/FeaturesAssigner.php +6 −2 Original line number Diff line number Diff line Loading @@ -282,8 +282,11 @@ class FeaturesAssigner implements FeaturesAssignerInterface { * {@inheritdoc} */ public function createBundleFromDefault($machine_name, $name = NULL, $description = NULL, $is_profile = FALSE, $profile_name = NULL) { // Clone the default bundle to get its default configuration. $bundle = clone $this->getBundle(FeaturesBundleInterface::DEFAULT_BUNDLE); $bundle = FeaturesBundle::create([]); // Initialize assignment settings from those of the default bundle. $default_bundle = $this->getBundle(FeaturesBundleInterface::DEFAULT_BUNDLE); $bundle->setAssignmentSettings(NULL, $default_bundle->getAssignmentSettings(NULL)); $bundle->setMachineName($machine_name); $bundle->setName($name); Loading @@ -299,6 +302,7 @@ class FeaturesAssigner implements FeaturesAssignerInterface { } $bundle->save(); $this->setBundle($bundle); return $bundle; } Loading src/FeaturesAssignerInterface.php +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ interface FeaturesAssignerInterface { public function findBundleByName($name); /** * Creates a new bundle by cloning the default bundle and customizing. * Creates a new bundle, copying over default assignment settings. * * @param string $machine_name * Machine name. Loading Loading
src/FeaturesAssigner.php +6 −2 Original line number Diff line number Diff line Loading @@ -282,8 +282,11 @@ class FeaturesAssigner implements FeaturesAssignerInterface { * {@inheritdoc} */ public function createBundleFromDefault($machine_name, $name = NULL, $description = NULL, $is_profile = FALSE, $profile_name = NULL) { // Clone the default bundle to get its default configuration. $bundle = clone $this->getBundle(FeaturesBundleInterface::DEFAULT_BUNDLE); $bundle = FeaturesBundle::create([]); // Initialize assignment settings from those of the default bundle. $default_bundle = $this->getBundle(FeaturesBundleInterface::DEFAULT_BUNDLE); $bundle->setAssignmentSettings(NULL, $default_bundle->getAssignmentSettings(NULL)); $bundle->setMachineName($machine_name); $bundle->setName($name); Loading @@ -299,6 +302,7 @@ class FeaturesAssigner implements FeaturesAssignerInterface { } $bundle->save(); $this->setBundle($bundle); return $bundle; } Loading
src/FeaturesAssignerInterface.php +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ interface FeaturesAssignerInterface { public function findBundleByName($name); /** * Creates a new bundle by cloning the default bundle and customizing. * Creates a new bundle, copying over default assignment settings. * * @param string $machine_name * Machine name. Loading