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

shop:onExtendCategoryForm event

Triggered by Shop_Category
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendCategoryForm(Shop_Category $category, string $context)
$category Shop_Category specifies the category object.
$context string specifies the execution context.
Allows to add new fields to the Create/Edit Category form in the Administration Area. Usually this event is used together with the shop:onExtendCategoryModel event. To add new fields to the category form, call the add_form_field() method of the category object.
public function subscribeEvents()
{
   Backend::$events->addEvent('shop:onExtendCategoryModel', $this, 'extend_category_model');
   Backend::$events->addEvent('shop:onExtendCategoryForm', $this, 'extend_category_form');
}

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

public function extend_category_form($category, $context)
{
   $category->add_form_field('x_extra_description')->tab('Category');
}