| Conditions | 6 |
| Paths | 7 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function getFileUrl($attr) |
||
| 16 | { |
||
| 17 | foreach ($this->behaviors as $behavior) { |
||
| 18 | if ($behavior instanceof Behavior) { |
||
| 19 | return $behavior->getFileUrl($attr); |
||
| 20 | } |
||
| 21 | } |
||
| 22 | |||
| 23 | $class = new \ReflectionClass($this); |
||
| 24 | $class = 'backend\models\\' . $class->getShortName(); |
||
| 25 | if (class_exists($class)) { |
||
| 26 | $model = new $class; |
||
| 27 | foreach ($model->behaviors as $behavior) { |
||
| 28 | if ($behavior instanceof Behavior) { |
||
| 29 | return $behavior->getFileUrl($attr, $this); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | return null; |
||
| 35 | } |
||
| 36 | } |
||
| 37 |