You are here

constant PUBLICATION_DATE_DEFAULT in Publication Date 8.2

Same name and namespace in other branches
  1. 8 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.

7 uses of PUBLICATION_DATE_DEFAULT
PublicationDateItem::preSave in src/Plugin/Field/FieldType/PublicationDateItem.php
Defines custom presave behavior for field values.
PublicationDateNodeFormTest::testNodeForm in tests/src/Functional/PublicationDateNodeFormTest.php
PublicationDatePreExistingContentTest::testWithExistingContent in tests/src/Functional/PublicationDatePreExistingContentTest.php
PublicationDateTest::testActionSaving in tests/src/Functional/PublicationDateTest.php
Test automatic saving of variables.
PublicationDateTest::testActionSavingSetDate in tests/src/Functional/PublicationDateTest.php

... See full list

File

./publication_date.module, line 20
Add a field to nodes containing the publication date.

Code

define('PUBLICATION_DATE_DEFAULT', 2147483647);