Extension base class

All extensions must inherit from the SMExtension base class. This class defines all the life cycle functions, and a constructor that receives a context object. The following example demonstrates how to define the main class for a new extension, and how to override one of the life cycle functions.

class MyExtension extends SMExtension
{
    // Override Init() function from SMExtension class
    public function Init()
    {
    }
}
See the Building extensions section for more information on how to create extensions.


SMExtension class

Function
Return type
Description
__construct($context:SMContext)

Used by controller to a create new instance of an extension. The $context object is an instance of the SMContext class. It contains information about what extension is currently running, and provides access to the template and form component.
PreInit()

See life cycle description.
Init()

See life cycle description.
InitComplete()

See life cycle description.
PreRender()

See life cycle description.
Render()
String
See life cycle description.
RenderComplete()
See life cycle description.
PreTemplateUpdate()
See life cycle description.
TemplateUpdateComplete()

See life cycle description.
PreOutput()

See life cycle description.
OutputComplete()

See life cycle description.
Unload()

See life cycle description.
Finalize()

See life cycle description.