DateFormat::$id

The date format machine name. Type: string File core/lib/Drupal/Core/Datetime/Entity/DateFormat.php, line 39 Class DateFormat Defines the Date Format configuration entity class. Namespace Drupal\Core\Datetime\Entity Code protected $id;

DateFormat

Defines the date format element for the configuration translation interface. Hierarchy class \Drupal\config_translation\FormElement\FormElementBase implements ElementInterface uses StringTranslationTraitclass \Drupal\config_translation\FormElement\DateFormat File core/modules/config_translation/src/FormElement/DateFormat.php, line 10 Namespace Drupal\config_translation\FormElement Members Name Modifiers Type Description DateFormat::getTranslationElement public function

DateFormat

Defines the Date Format configuration entity class. Plugin annotation @ConfigEntityType( id = "date_format", label = @Translation("Date format"), handlers = { "access" = "Drupal\system\DateFormatAccessControlHandler", }, entity_keys = { "id" = "id", "label" = "label" }, admin_permission = "administer site configuration", list_cache_tags = { "rendered" }, config_export = { "id", "label", "locked", "pattern", } ) Hierarchy class \Drupal\Core\Entity

DateElementBase::datetimeRangeYears

protected static DateElementBase::datetimeRangeYears($string, $date = NULL) Specifies the start and end year to use as a date range. Handles a string like -3:+3 or 2001:2010 to describe a dynamic range of minimum and maximum years to use in a date selector. Centers the range around the current year, if any, but expands it far enough so it will pick up the year value in the field in case the value in the field is outside the initial range. Parameters string $string: A min and max year string li

DateElementBase

Provides a base class for date elements. Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Render\Element\RenderElement implements ElementInterfaceclass \Drupal\Core\Render\Element\FormElement implements FormElementInterfaceclass \Drupal\Core\Datetime\Element\DateElementBase File core/lib/Drupal/Core/Datetime

Date::processDate

public static Date::processDate(&$element, FormStateInterface $form_state, &$complete_form) Processes a date form element. Parameters array $element: The form element to process. Properties used: #attributes: An associative array containing: type: The type of date field rendered. #date_date_format: The date format used in PHP formats. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. array $complete_form: The complete form structure. Return value a

Date::preRenderDate

public static Date::preRenderDate($element) Adds form-specific attributes to a 'date' #type element. Supports HTML5 types of 'date', 'datetime', 'datetime-local', and 'time'. Falls back to a plain textfield with JS datepicker support. Used as a sub-element by the datetime element type. Parameters array $element: An associative array containing the properties of the element. Properties used: #title, #value, #options, #description, #required, #attributes, #id, #name, #type, #min, #max, #step, #v

Date::getInfo

public Date::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Date.php, line 30 Class Date Provides a form element for date selection. Namespace Drupal\Core\Render\Element Code public function getI

Date

Provides a form element for date selection. Properties: #default_value: An array with the keys: 'year', 'month', and 'day'. Defaults to the current date if no value is supplied. $form['expiration'] = array( '#type' => 'date', '#title' => $this->t('Content expiration'), '#default_value' => array('year' => 2020, 'month' => 2, 'day' => 15,) ); Plugin annotation @FormElement("date") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionIn

DataType::$unwrap_for_canonical_representation

Whether the typed object wraps the canonical representation of the data. Type: bool See also \Drupal\Core\TypedData\TypedDataManager::getCanonicalRepresentation() File core/lib/Drupal/Core/TypedData/Annotation/DataType.php, line 111 Class DataType Defines a data type annotation object. Namespace Drupal\Core\TypedData\Annotation Code public $unwrap_for_canonical_representation = TRUE;