public function __construct(Form $form, $metaId = null, $baseFieldName = 'title', $custom = false)
{
// check if URL is available from the reference
if (!BackendModel::getContainer()->has('url')) {
throw new Exception('URL should be available in the reference.');
}
// get BackendURL instance
$this->URL = BackendModel::getContainer()->get('url');
// should we use meta-custom
$this->custom = (bool) $custom;
// set form instance
$this->frm = $form;
// set base field name
$this->baseFieldName = (string) $baseFieldName;
// metaId was specified, so we should load the item
if ($metaId !== null) {
$this->loadMeta($metaId);
}
// set default callback
$this->setURLCallback('Backend\\Modules\\' . $this->URL->getModule() . '\\Engine\\Model', 'getURL');
// load the form
$this->loadForm();
}