@@ 512-521 (lines=10) @@ | ||
509 | * |
|
510 | * @return bool |
|
511 | */ |
|
512 | public function getIsPublishScheduled() |
|
513 | { |
|
514 | if (!$this->owner->PublishOnDate) { |
|
515 | return false; |
|
516 | } |
|
517 | $now = DBDatetime::now()->getTimestamp(); |
|
518 | $publish = $this->owner->dbObject('PublishOnDate')->getTimestamp(); |
|
519 | ||
520 | return $now < $publish; |
|
521 | } |
|
522 | ||
523 | /** |
|
524 | * Returns whether an unpublishing date has been set and is after the current date |
|
@@ 528-537 (lines=10) @@ | ||
525 | * |
|
526 | * @return bool |
|
527 | */ |
|
528 | public function getIsUnPublishScheduled() |
|
529 | { |
|
530 | if (!$this->owner->UnPublishOnDate) { |
|
531 | return false; |
|
532 | } |
|
533 | $now = DBDatetime::now()->getTimestamp(); |
|
534 | $unpublish = $this->owner->dbObject('UnPublishOnDate')->getTimestamp(); |
|
535 | ||
536 | return $now < $unpublish; |
|
537 | } |
|
538 | ||
539 | /** |
|
540 | * Add edit check for when publishing has been scheduled and if any workflow definitions want the item to be |