You are here

protected function ServicesClientPropertyCondition::equals in Services Client 7.2

Check if configured property equals configured value.

Parameters

stdClass $entity: Drupal entity that is tested.

Return value

boolean TRUE if empty

1 call to ServicesClientPropertyCondition::equals()
ServicesClientPropertyCondition::match in include/condition.inc
Match entity with condition.

File

include/condition.inc, line 106

Class

ServicesClientPropertyCondition
Test property condition of entity against value.

Code

protected function equals($entity) {
  if (!isset($entity->{$this->config['property']})) {
    return FALSE;
  }
  else {
    return $entity->{$this->config['property']} == $this->config['value'];
  }
}