You are here

public function CalendarEntry::getRelevantDate in Content Planner 8

Get the relevant date for the current node.

When the Scheduler date is empty, then take the creation date.

Return value

int

File

modules/content_calendar/src/Component/CalendarEntry.php, line 80

Class

CalendarEntry
Class CalendarEntry.

Namespace

Drupal\content_calendar\Component

Code

public function getRelevantDate() {
  if ($this->node->publish_on) {
    return $this->node->publish_on;
  }
  return $this->node->created;
}