Condition::__clone()
PHP magic __clone() method.
Only copies fields that implement Drupal\Core\Database\Query\ConditionInterface. Also sets $this->changed to TRUE.
function __clone() { $this->changed = TRUE; foreach ($this->conditions as $key => $condition) { if ($key !== '#conjunction') { if ($condition['field'] instanceof ConditionInterface) { $this->conditions[$key]['field'] = clone($condition['field']); } if ($condition['value'] instanceof SelectInterface) { $this->conditions[$key]['value'] = clone($condition['value']); } } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Query!Condition.php/function/Condition::__clone/8.1.x