You are here

function _publication_date_published_at_or_now_getter in Publication Date 7.2

Publication date or now getter for hook_entity_property_info_alter()

Parameters

object $entity: The entity object.

Return value

int The publication date (or REQUEST_TIME) as a timestamp get from the entity.

1 string reference to '_publication_date_published_at_or_now_getter'
publication_date_entity_property_info_alter in ./publication_date.module
Implements hook_entity_property_info_alter().

File

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

Code

function _publication_date_published_at_or_now_getter($entity) {
  return $entity->published_at_or_now;
}