option to move entries from one entity to another upon deletion (#409)

This commit is contained in:
Kevin Papst
2018-11-12 00:01:49 +01:00
committed by GitHub
parent 1dabeedaa0
commit f9dc42d1f9
18 changed files with 524 additions and 23 deletions

View File

@@ -9,9 +9,34 @@
namespace App\Repository\Query;
use App\Entity\Customer;
/**
* Can be used for advanced queries with the: CustomerRepository
*/
class CustomerQuery extends VisibilityQuery
{
/**
* @var array
*/
protected $ignored = [];
/**
* @param Customer|int $customer
* @return $this
*/
public function addIgnoredEntity($customer)
{
$this->ignored[] = $customer;
return $this;
}
/**
* @return array
*/
public function getIgnoredEntities()
{
return $this->ignored;
}
}