This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

cms:onPreparePartialListData event

Triggered by Cms_Partial
Author LemonStand eCommerce Inc.

Event handler signature

public Cms_Partial event_onPreparePartialListData(Backend_Controller $controller)
$controller Backend_Controller the back-end controller object.
{return} Cms_Partial configured CMS Partial object.
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;
}