01.
public
function
subscribeEvents()
02.
{
03.
Backend::
$events
->addEvent(
'cms:onExtendPageModel'
,
$this
,
'extend_page_model'
);
04.
Backend::
$events
->addEvent(
'cms:onExtendPageForm'
,
$this
,
'extend_page_form'
);
05.
}
06.
07.
public
function
extend_page_model(
$page
,
$context
)
08.
{
09.
$page
->define_column(
'x_extra_description'
,
'Extra description'
);
10.
}
11.
12.
public
function
extend_page_form(
$page
,
$context
)
13.
{
14.
if
(
$context
!=
'content'
)
15.
$page
->add_form_field(
'x_extra_description'
)->tab(
'Description'
);
16.
}