FeaturesAssignmentMethodInterface.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace Drupal\features;
  3. use Drupal\Component\Plugin\PluginInspectionInterface;
  4. use Drupal\Core\Config\ConfigFactoryInterface;
  5. use Drupal\Core\Entity\EntityTypeManagerInterface;
  6. /**
  7. * Interface for package assignment classes.
  8. */
  9. interface FeaturesAssignmentMethodInterface extends PluginInspectionInterface {
  10. /**
  11. * Injects the features manager.
  12. *
  13. * @param \Drupal\features\FeaturesManagerInterface $features_manager
  14. * The features manager to be used to retrieve the configuration list and
  15. * the already assigned packages.
  16. */
  17. public function setFeaturesManager(FeaturesManagerInterface $features_manager);
  18. /**
  19. * Injects the features assigner.
  20. *
  21. * @param \Drupal\features\FeaturesAssignerInterface $assigner
  22. * The features assigner to be used to retrieve the bundle configuration.
  23. */
  24. public function setAssigner(FeaturesAssignerInterface $assigner);
  25. /**
  26. * Injects the entity manager.
  27. *
  28. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
  29. * The entity type manager to be used to retrieve entity information.
  30. */
  31. public function setEntityTypeManager(EntityTypeManagerInterface $entity_type_manager);
  32. /**
  33. * Injects the configuration factory.
  34. *
  35. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
  36. * The configuration factory to be used to retrieve configuration values.
  37. */
  38. public function setConfigFactory(ConfigFactoryInterface $config_factory);
  39. /**
  40. * Performs package assignment.
  41. *
  42. * @param bool $force
  43. * (optional) If TRUE, assign config regardless of restrictions such as it
  44. * being already assigned to a package.
  45. */
  46. public function assignPackages($force = FALSE);
  47. }