| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2.024 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | 6 | public function build($partialPath, array $args = []) |
|
| 14 | { |
||
| 15 | 6 | $className = Helper::buildClassName($partialPath, 'Modules\Html\Partials'); |
|
| 16 | 6 | $className = $this->app()->filterString('partial/classname', $className, $partialPath); |
|
| 17 | 6 | if (!class_exists($className)) { |
|
| 18 | glsr_log()->error('Partial missing: '.$className); |
||
| 19 | return; |
||
| 20 | } |
||
| 21 | 6 | $args = $this->app()->filterArray('partial/args/'.$partialPath, $args); |
|
| 22 | 6 | $partial = glsr($className)->build($args); |
|
| 23 | 6 | $partial = $this->app()->filterString('rendered/partial', $partial, $partialPath, $args); |
|
| 24 | 6 | $partial = $this->app()->filterString('rendered/partial/'.$partialPath, $partial, $args); |
|
| 25 | 6 | return $partial; |
|
| 26 | } |
||
| 45 |