Allows to define new columns in the company information model.
The event handler should accept a single parameter - the company information object. To add new columns to the model,
call the
define_column() method of the company information object. Before you add new columns to the model,
you should add them to the database (the
shop_company_information table).
public function subscribeEvents()
{
Backend::$events->addEvent('shop:onExtendCompanyInformationModel', $this, 'extend_company_information_model');
Backend::$events->addEvent('shop:onExtendCompanyInformationForm', $this, 'extend_company_information_form');
}
public function extend_company_information_model($company_information)
{
$company_information->define_column('x_extra_description', 'Extra description');
}
public function extend_company_information_form($company_information, $context)
{
$company_information->add_form_field('x_extra_description')->tab('Custom');
}