src/Ffcms/Core/Arch/View.php 1 location
|
@@ 196-200 (lines=5) @@
|
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
// render defaults params as variables |
| 196 |
|
if (Obj::isArray($params) && count($params) > 0) { |
| 197 |
|
foreach ($params as $key => $value) { |
| 198 |
|
$$key = $value; |
| 199 |
|
} |
| 200 |
|
} |
| 201 |
|
|
| 202 |
|
$global = $this->buildGlobal(); |
| 203 |
|
$self = $this; |
src/Ffcms/Core/Arch/Widget.php 1 location
|
@@ 30-36 (lines=7) @@
|
| 27 |
|
|
| 28 |
|
// init class and pass properties |
| 29 |
|
$object = new self::$class; |
| 30 |
|
if (Obj::isArray($params) && count($params) > 0) { |
| 31 |
|
foreach ($params as $property => $value) { |
| 32 |
|
if (property_exists($object, $property)) { |
| 33 |
|
$object->$property = $value; |
| 34 |
|
} |
| 35 |
|
} |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
// prepare output |
| 39 |
|
$out = null; |