function rules_condition_entity_has_field

Condition: Entity has field.

Related topics

1 string reference to 'rules_condition_entity_has_field'
rules_entity_condition_info in modules/entity.rules.inc
Implements hook_rules_condition_info() on behalf of the entity module.

File

modules/entity.eval.inc, line 166

Code

function rules_condition_entity_has_field($wrapper, $field_name, $settings, $state) {
    return isset($wrapper->{$field_name}) || isset($wrapper->value()->{$field_name});
}