You are here

public function EntityFieldCompareTypeInterface::evaluate in Entity Field Condition 2.0.x

Evaluate the entity field value.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity instance.

string $field_name: The entity field name.

Return value

bool Return TRUE if the field value compare is valid, otherwise FALSE.

2 methods override EntityFieldCompareTypeInterface::evaluate()
EntityFieldNullCompareType::evaluate in src/Plugin/EntityFieldCondition/CompareType/EntityFieldNullCompareType.php
Evaluate the entity field value.
EntityFieldOperationCompareType::evaluate in src/Plugin/EntityFieldCondition/CompareType/EntityFieldOperationCompareType.php
Evaluate the entity field value.

File

src/Contracts/EntityFieldCompareTypeInterface.php, line 28

Class

EntityFieldCompareTypeInterface
Define the entity field compare type interface.

Namespace

Drupal\entity_field_condition\Contracts

Code

public function evaluate(ContentEntityInterface $entity, string $field_name) : bool;