function EntityIsNew::doEvaluate
Check if the provided entity is new.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to check.
Return value
bool TRUE if the provided entity is new.
File
-
src/
Plugin/ Condition/ EntityIsNew.php, line 37
Class
- EntityIsNew
- Provides an 'Entity is new' condition.
Namespace
Drupal\rules\Plugin\ConditionCode
protected function doEvaluate(EntityInterface $entity) {
return $entity->isNew();
}