ConfigDeleteInterface.php 959 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Drupal\config_update;
  3. /**
  4. * Defines an interface for deleting config items.
  5. */
  6. interface ConfigDeleteInterface {
  7. /**
  8. * Name of the event triggered on configuration delete.
  9. *
  10. * @see \Drupal\config_update\ConfigRevertEvent
  11. * @see \Drupal\config_update\ConfigDeleteInterface::delete()
  12. */
  13. const DELETE = 'config_update.delete';
  14. /**
  15. * Deletes a configuration item.
  16. *
  17. * This action triggers a ConfigDeleteInterface::DELETE event.
  18. *
  19. * @param string $type
  20. * The type of configuration.
  21. * @param string $name
  22. * The name of the config item, without the prefix.
  23. *
  24. * @return bool
  25. * TRUE if the operation succeeded; FALSE if the base configuration could
  26. * not be found to delete. May also throw exceptions if there is a
  27. * problem during deleting the configuration.
  28. *
  29. * @see \Drupal\config_update\ConfigDeleteInterface::DELETE
  30. */
  31. public function delete($type, $name);
  32. }