mirror of
https://github.com/e107inc/e107.git
synced 2025-08-29 17:19:56 +02:00
Event hooks now allows for multiple form elements.
Also added $frm->renderHooks($data).
This commit is contained in:
@@ -671,6 +671,7 @@ class page_admin_ui extends e_admin_ui
|
||||
|
||||
|
||||
//triggerHook
|
||||
|
||||
$data = array(
|
||||
'method' =>'form',
|
||||
'table' =>'page',
|
||||
@@ -679,37 +680,12 @@ class page_admin_ui extends e_admin_ui
|
||||
'function' => 'createPage'
|
||||
);
|
||||
|
||||
$hooks = $e_event->triggerHook($data);
|
||||
if(!empty($hooks))
|
||||
{
|
||||
$text .= "
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset id='core-cpage-create-hooks'>
|
||||
<legend>".LAN_HOOKS."</legend>
|
||||
<table class='adminform options'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
</colgroup>
|
||||
<tbody>";
|
||||
|
||||
foreach($hooks as $hook)
|
||||
{
|
||||
if(!empty($hook))
|
||||
{
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>".$hook['caption']."</td>
|
||||
<td>".$hook['text']."</td>
|
||||
</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$text .= $frm->renderHooks($data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$text .= "
|
||||
</tbody>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user