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

Triggered by Cms_Page
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendPageModel(Cms_Page $page, string $context)
$page Cms_Page specifies the page object to extend.
$context string specifies the execution context.
Allows to define new columns in the page model. The event handler should accept two parameters - the page object and the form execution context string. To add new columns to the page model, call the define_column() method of the page object. Before you add new columns to the model, you should add them to the database (the pages table).
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onExtendPageModel', $this, 'extend_page_model');
  Backend::$events->addEvent('cms:onExtendPageForm', $this, 'extend_page_form');
}

public function extend_page_model($page, $context)
{
  $page->define_column('x_extra_description', 'Extra description');
}

public function extend_page_form($page, $context)
{
  if ($context != 'content')  
    $page->add_form_field('x_extra_description')->tab('Description');
}