public function ScheduledForUnpublishing::doEvaluate in Scheduler 2.x
Determines whether an entity is scheduled for unpublishing.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to be checked.
Return value
bool TRUE if the entity is scheduled for unpublishing, FALSE if not.
File
- scheduler_rules_integration/
src/ Plugin/ Condition/ ScheduledForUnpublishing.php, line 27
Class
- ScheduledForUnpublishing
- Provides 'Entity is scheduled for publishing' condition.
Namespace
Drupal\scheduler_rules_integration\Plugin\ConditionCode
public function doEvaluate(EntityInterface $entity) {
return isset($entity->unpublish_on->value);
}