You are here

public function FeaturesBundle::getProfileName in Features 8.3

Same name and namespace in other branches
  1. 8.4 src/Entity/FeaturesBundle.php \Drupal\features\Entity\FeaturesBundle::getProfileName()

Returns the machine name of the profile.

If the bundle doesn't use a profile, return the current site profile.

Return value

string THe machie name of a profile.

Overrides FeaturesBundleInterface::getProfileName

See also

\Drupal\features\FeaturesBundleInterface::setProfileName()

1 call to FeaturesBundle::getProfileName()
FeaturesBundle::isProfilePackage in src/Entity/FeaturesBundle.php
Determines if the package with $machine_name is the bundle profile.

File

src/Entity/FeaturesBundle.php, line 195

Class

FeaturesBundle
Defines a features bundle.

Namespace

Drupal\features\Entity

Code

public function getProfileName() {
  $name = $this
    ->isProfile() ? $this->profile_name : '';

  // Use Settings::get to fetch current profile name so we can easily test.
  return !empty($name) ? $name : Settings::get('install_profile');
}