src/Ffcms/Core/Arch/View.php 1 location
|
@@ 207-211 (lines=5) @@
|
| 204 |
|
} |
| 205 |
|
|
| 206 |
|
// render defaults params as variables |
| 207 |
|
if (Obj::isArray($params) && count($params) > 0) { |
| 208 |
|
foreach ($params as $key => $value) { |
| 209 |
|
$$key = $value; |
| 210 |
|
} |
| 211 |
|
} |
| 212 |
|
|
| 213 |
|
$global = $this->buildGlobal(); |
| 214 |
|
$self = $this; |
src/Ffcms/Core/Arch/Widget.php 1 location
|
@@ 34-40 (lines=7) @@
|
| 31 |
|
|
| 32 |
|
// init class and pass properties |
| 33 |
|
$object = new self::$class; |
| 34 |
|
if (Obj::isArray($params) && count($params) > 0) { |
| 35 |
|
foreach ($params as $property => $value) { |
| 36 |
|
if (property_exists($object, $property)) { |
| 37 |
|
$object->$property = $value; |
| 38 |
|
} |
| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
// prepare output |
| 43 |
|
$out = null; |