Conditions | 9 |
Paths | 17 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function triggerBeforeFind() |
||
21 | { |
||
22 | if (!$this->_beforeFindFired && $this->_type === 'select') { |
||
23 | parent::triggerBeforeFind(); |
||
24 | |||
25 | if (method_exists($this, 'getRepository')) { |
||
26 | $repository = $this->getRepository(); |
||
27 | } else { |
||
28 | $repository = $this->repository(); |
||
29 | } |
||
30 | |||
31 | $options = $this->getOptions(); |
||
32 | if (method_exists($this, 'getRepository')) { |
||
33 | $findWithDeleted = in_array('withDeleted', $options) || $this->getRepository()->findWithDeleted(); |
||
34 | } else { |
||
35 | $findWithDeleted = in_array('withDeleted', $options) || $this->repository()->findWithDeleted(); |
||
36 | } |
||
37 | |||
38 | if (!is_array($options) || !$findWithDeleted) { |
||
|
|||
39 | $this->andWhere($repository->getActiveExpression()); |
||
40 | } |
||
44 |