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:onPreparePageListData event

Triggered by Cms_Page
Author LemonStand eCommerce Inc.

Event handler signature

public Cms_Page event_onPreparePageListData(Backend_Controller $controller)
$controller Backend_Controller the back-end controller object.
{return} Cms_Page configured CMS Page object.
Allows to alter the list of pages on the CMS/Pages page in the Administration Area. The event handler accepts the back-end controller object and should return a configured Cms_Page object. The following example repeats the default functionality, and effectively does not change the page list behavior.
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onPreparePageListData', $this, 'prepare_page_list');
}

public function prepare_page_list($controller) 
{
  $obj = Cms_Page::create();

  if (!$controller->currentUser->get_permission('cms', 'manage_pages'))
    $obj->where('pages.has_contentblocks is not null and pages.has_contentblocks > 0');

  if (Cms_Theme::is_theming_enabled())
  {
    $theme = Cms_Theme::get_edit_theme();
    if ($theme)
      $obj->where('theme_id=?', $theme->id);
  }

  return $obj;
}