DateFormatInterface.php 760 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Drupal\Core\Datetime;
  3. use Drupal\Core\Config\Entity\ConfigEntityInterface;
  4. /**
  5. * Provides an interface defining a date format.
  6. */
  7. interface DateFormatInterface extends ConfigEntityInterface {
  8. /**
  9. * Gets the date pattern string for this format.
  10. *
  11. * @return string
  12. * The pattern string as expected by date().
  13. */
  14. public function getPattern();
  15. /**
  16. * Sets the date pattern for this format.
  17. *
  18. * @param string $pattern
  19. * The date pattern to use for this format.
  20. *
  21. * @return $this
  22. */
  23. public function setPattern($pattern);
  24. /**
  25. * Determines if this date format is locked.
  26. *
  27. * @return bool
  28. * TRUE if the date format is locked, FALSE otherwise.
  29. */
  30. public function isLocked();
  31. }