protected function NodeIsOfType::doEvaluate in Rules 8.3
Check if a node is of a specific set of types.
Parameters
\Drupal\node\NodeInterface $node: The node to check for a type.
string[] $types: An array of type names as strings.
Return value
bool TRUE if the node type is in the array of types.
File
- src/
Plugin/ Condition/ NodeIsOfType.php, line 42
Class
- NodeIsOfType
- Provides a 'Node is of type' condition.
Namespace
Drupal\rules\Plugin\ConditionCode
protected function doEvaluate(NodeInterface $node, array $types) {
return in_array($node
->getType(), $types);
}