public function FeaturesAssigner::__construct in Features 8.3
Same name and namespace in other branches
- 8.4 src/FeaturesAssigner.php \Drupal\features\FeaturesAssigner::__construct()
Constructs a new FeaturesAssigner object.
Parameters
\Drupal\features\FeaturesManagerInterface $features_manager: The features manager.
\Drupal\Component\Plugin\PluginManagerInterface $assigner_manager: The package assignment methods plugin manager.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.
\Drupal\Core\Config\StorageInterface $config_storage: The configuration factory.
string $install_profile: The name of the currently active installation profile.
File
- src/
FeaturesAssigner.php, line 97
Class
- FeaturesAssigner
- Class responsible for performing package assignment.
Namespace
Drupal\featuresCode
public function __construct(FeaturesManagerInterface $features_manager, PluginManagerInterface $assigner_manager, EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, StorageInterface $config_storage, $install_profile) {
$this->featuresManager = $features_manager;
$this->assignerManager = $assigner_manager;
$this->entityTypeManager = $entity_type_manager;
$this->configFactory = $config_factory;
$this->configStorage = $config_storage;
$this->installProfile = $install_profile;
$this->bundles = $this
->getBundleList();
$this->currentBundle = $this
->getBundle(FeaturesBundleInterface::DEFAULT_BUNDLE);
// Ensure bundle information is fresh.
$this
->createBundlesFromPackages();
}