/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/ORM/Association
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/ORM/Association/DependentDeleteHelper.php (2220B)
getDependent()) {
return true;
}
$table = $association->getTarget();
/** @psalm-suppress InvalidArgument */
$foreignKey = array_map([$association, 'aliasField'], (array)$association->getForeignKey());
$bindingKey = (array)$association->getBindingKey();
$conditions = array_combine($foreignKey, $entity->extract($bindingKey));
if ($association->getCascadeCallbacks()) {
foreach ($association->find()->where($conditions)->all()->toList() as $related) {
$success = $table->delete($related, $options);
if (!$success) {
return false;
}
}
return true;
}
$association->deleteAll($conditions);
return true;
}
}