You are here

protected function NodeIsScheduledForUnpublishing::doEvaluate in Scheduler 8

Determines whether a node is scheduled for unpublishing.

Return value

bool TRUE if the node is scheduled for unpublishing, FALSE if not.

File

scheduler_rules_integration/src/Plugin/Condition/NodeIsScheduledForUnpublishing.php, line 30

Class

NodeIsScheduledForUnpublishing
Provides 'Node is scheduled for unpublishing' condition.

Namespace

Drupal\scheduler_rules_integration\Plugin\Condition

Code

protected function doEvaluate() {
  $node = $this
    ->getContextValue('node');
  return !empty($node->unpublish_on->value);
}