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