DateFormatter

Provides a service to handle various date related functionality. Hierarchy class \Drupal\Core\Datetime\DateFormatter implements DateFormatterInterface uses StringTranslationTrait Related topics Internationalization Internationalization and translation File core/lib/Drupal/Core/Datetime/DateFormatter.php, line 18 Namespace Drupal\Core\Datetime Members Name Modifiers Type Description DateFormatter::$configFactory protected property The configuration factory. DateFormat

DateFormatListBuilder::__construct

public DateFormatListBuilder::__construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, DateFormatterInterface $date_formatter) Constructs a new DateFormatListBuilder object. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition. \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage class. \Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service. Overrides EntityListBuilder::__construct

DateFormatListBuilder::createInstance

public static DateFormatListBuilder::createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) Instantiates a new instance of this entity handler. This is a factory method that returns a new instance of this object. The factory should pass any needed dependencies into the constructor of this object, but not the container itself. Every call to this method must return a new instance of this object; that is, it may not implement a singleton. Parameters \Symfony\Component\Dep

DateFormatListBuilder::buildRow

public DateFormatListBuilder::buildRow(EntityInterface $entity) Builds a row for an entity in the entity listing. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list. Return value array A render array structure of fields for this entity. Overrides EntityListBuilder::buildRow See also \Drupal\Core\Entity\EntityListBuilder::render() File core/modules/system/src/DateFormatListBuilder.php, line 65 Class DateFormatListBuilder Defines a class to build a

DateFormatListBuilder::buildHeader

public DateFormatListBuilder::buildHeader() Builds the header row for the entity listing. Return value array A render array structure of header strings. Overrides EntityListBuilder::buildHeader See also \Drupal\Core\Entity\EntityListBuilder::render() File core/modules/system/src/DateFormatListBuilder.php, line 56 Class DateFormatListBuilder Defines a class to build a listing of date format entities. Namespace Drupal\system Code public function buildHeader() { $header['label'] = t('

DateFormatListBuilder::$dateFormatter

The date formatter service. Type: \Drupal\Core\Datetime\DateFormatterInterface File core/modules/system/src/DateFormatListBuilder.php, line 24 Class DateFormatListBuilder Defines a class to build a listing of date format entities. Namespace Drupal\system Code protected $dateFormatter;

DateFormatListBuilder

Defines a class to build a listing of date format entities. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityListBuilder implements EntityHandlerInterface, EntityListBuilderInterfaceclass \Drupal\Core\Config\Entity\ConfigEntityListBuilderclass \Drupal\system\DateFormatListBuilder See also \Drupal\system\Entity\DateFormat File core/modules/system/src/DateFormatListBuilder.php, line 17 Namespac

DateFormatInterface::setPattern

public DateFormatInterface::setPattern($pattern) Sets the date pattern for this format. Parameters string $pattern: The date pattern to use for this format. Return value $this File core/lib/Drupal/Core/Datetime/DateFormatInterface.php, line 28 Class DateFormatInterface Provides an interface defining a date format. Namespace Drupal\Core\Datetime Code public function setPattern($pattern);

DateFormatInterface::isLocked

public DateFormatInterface::isLocked() Determines if this date format is locked. Return value bool TRUE if the date format is locked, FALSE otherwise. File core/lib/Drupal/Core/Datetime/DateFormatInterface.php, line 36 Class DateFormatInterface Provides an interface defining a date format. Namespace Drupal\Core\Datetime Code public function isLocked();

DateFormatInterface::getPattern

public DateFormatInterface::getPattern() Gets the date pattern string for this format. Return value string The pattern string as expected by date(). File core/lib/Drupal/Core/Datetime/DateFormatInterface.php, line 18 Class DateFormatInterface Provides an interface defining a date format. Namespace Drupal\Core\Datetime Code public function getPattern();