|
@@ 154-160 (lines=7) @@
|
| 151 |
|
// hmm, not founded. Lets try to find in caller directory (for widgets, apps packages and other) |
| 152 |
|
if ($source !== null) { |
| 153 |
|
$tmpPath = Normalize::diskPath($source . DIRECTORY_SEPARATOR . $path . '.php'); |
| 154 |
|
if (File::exist($tmpPath)) { |
| 155 |
|
// add notify for native views |
| 156 |
|
if (App::$Debug !== null) { |
| 157 |
|
App::$Debug->addMessage('Render native viewer: ' . Str::replace(root, null, $tmpPath), 'info'); |
| 158 |
|
} |
| 159 |
|
return $tmpPath; |
| 160 |
|
} |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
if (App::$Debug !== null) { |
|
@@ 188-193 (lines=6) @@
|
| 185 |
|
*/ |
| 186 |
|
protected function renderSandbox($path, $params = null) |
| 187 |
|
{ |
| 188 |
|
if ($path === null || !File::exist($path)) { |
| 189 |
|
if (App::$Debug !== null) { |
| 190 |
|
App::$Debug->addMessage('Viewer is not founded: ' . $path, 'error'); |
| 191 |
|
} |
| 192 |
|
return null; |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
// render defaults params as variables |
| 196 |
|
if (Obj::isArray($params) && count($params) > 0) { |