constant PUBLICATION_DATE_DEFAULT in Publication Date 8
Same name and namespace in other branches
- 8.2 publication_date.module \PUBLICATION_DATE_DEFAULT
Define the value stored in the database when a node is unpublished and no publication date has been set. We use the largest number that the database field can hold so unpublished nodes will appear newer than published nodes when sorted by publication date.
@note: This is going to trigger the Year 2038 problem.
3 uses of PUBLICATION_DATE_DEFAULT
- PublicationDateItem::preSave in src/
Plugin/ Field/ FieldType/ PublicationDateItem.php - Defines custom presave behavior for field values.
- publication_date_node_presave in ./
publication_date.module - Implements hook_ENTITY_TYPE_presave().
- TimestampDatetimeWidget::formElement in src/
Plugin/ Field/ FieldWidget/ TimestampDatetimeWidget.php - Returns the form for a single field widget.
File
- ./
publication_date.module, line 16 - Add a field to nodes containing the publication date.
Code
define('PUBLICATION_DATE_DEFAULT', 2147483647);