-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrender_frames.ctp
More file actions
33 lines (31 loc) · 880 Bytes
/
render_frames.ctp
File metadata and controls
33 lines (31 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Render frames element.
*
* @copyright Copyright 2014, NetCommons Project
* @author Kohei Teraguchi <kteraguchi@commonsnet.org>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
*/
foreach ($box['Frame'] as $frame) {
if (strlen($frame['plugin_key']) === 0) {
continue;
}
try {
$url = $this->PageLayout->frameActionUrl($frame);
$view = $this->PageLayout->requestAction($url, array('return', 'frame_id' => $frame['id']));
if (! Current::isSettingMode() && strlen($view) === 0) {
continue;
}
echo $this->element('Frames.frame', array(
'frame' => $frame,
'view' => $view,
'containerType' => $containerType,
'box' => $box,
));
} catch (MissingActionException $ex) {
CakeLog::error($ex);
} catch (MissingControllerException $ex) {
CakeLog::error($ex);
}
}