/** * Constructs a new localize panel view * @param boolean $enabled True to enable the localize form, false to disable it * @return null */ public function __construct($enabled = true) { parent::__construct(self::TEMPLATE); $form = new LocalizePanelForm(); if ($enabled) { $this->addJavascript(self::SCRIPT_LOCALIZE); $this->addInlineJavascript('ziboAdminInitializeLocalizePanel();'); } else { $form->setIsDisabled(true); } $this->set('form', $form); }