Allows to alter the list of layouts on the CMS/Layouts page in the Administration Area.
The event handler accepts the back-end controller object and should return
a configured
Cms_Template object. The following example repeats the default functionality,
and effectively does not change the layout list behavior.
public function subscribeEvents()
{
Backend::$events->addEvent('cms:onPrepareTemplateListData', $this, 'prepare_layout_list');
}
public function prepare_layout_list($controller)
{
$obj = Cms_Template::create();
if (Cms_Theme::is_theming_enabled())
{
$theme = Cms_Theme::get_edit_theme();
if ($theme)
$obj->where('theme_id=?', $theme->id);
}
return $obj;
}