initData() public méthode

Initialize form data.
public initData ( )
 /**
  * @see Plugin::manage()
  */
 function manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = null)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $request = $this->getRequest();
     switch ($verb) {
         case 'settings':
             $templateMgr = TemplateManager::getManager($request);
             $templateMgr->register_function('plugin_url', array($this, 'smartyPluginUrl'));
             $journal = $request->getJournal();
             AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_MANAGER);
             $this->import('PhpMyVisitesSettingsForm');
             $form = new PhpMyVisitesSettingsForm($this, $journal->getId());
             if ($request->getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     $request->redirect(null, 'manager', 'plugin');
                     return false;
                 } else {
                     $form->display();
                 }
             } else {
                 $form->initData();
                 $form->display();
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
 function manage($verb, $args, &$message)
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
     $conference =& Request::getConference();
     $returner = true;
     switch ($verb) {
         case 'enable':
             $this->setEnabled(true);
             $returner = false;
             $message = __('plugins.generic.phpmv.enabled');
             break;
         case 'disable':
             $this->setEnabled(false);
             $returner = false;
             $message = __('plugins.generic.phpmv.disabled');
             break;
         case 'settings':
             if ($this->getEnabled()) {
                 $this->import('PhpMyVisitesSettingsForm');
                 $form = new PhpMyVisitesSettingsForm($this, $conference->getId());
                 if (Request::getUserVar('save')) {
                     $form->readInputData();
                     if ($form->validate()) {
                         $form->execute();
                         Request::redirect(null, null, 'manager', 'plugin');
                     } else {
                         $this->setBreadCrumbs(true);
                         $form->display();
                     }
                 } else {
                     $this->setBreadCrumbs(true);
                     $form->initData();
                     $form->display();
                 }
             } else {
                 Request::redirect(null, null, 'manager');
             }
             break;
         default:
             Request::redirect(null, null, 'manager');
     }
     return $returner;
 }
 function manage($verb, $args, &$message, &$messageParams)
 {
     if (!parent::manage($verb, $args, $message, $messageParams)) {
         return false;
     }
     $request =& $this->getRequest();
     switch ($verb) {
         case 'settings':
             $templateMgr =& TemplateManager::getManager();
             $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
             $conference =& $request->getConference();
             $this->import('PhpMyVisitesSettingsForm');
             $form = new PhpMyVisitesSettingsForm($this, $conference->getId());
             if ($request->getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     $request->redirect(null, null, 'manager', 'plugin');
                     return false;
                 } else {
                     $this->setBreadCrumbs(true);
                     $form->display();
                 }
             } else {
                 $this->setBreadCrumbs(true);
                 $form->initData();
                 $form->display();
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }
 function manage($verb, $args, &$message)
 {
     if (!parent::manage($verb, $args, $message)) {
         return false;
     }
     switch ($verb) {
         case 'settings':
             $templateMgr =& TemplateManager::getManager();
             $templateMgr->register_function('plugin_url', array(&$this, 'smartyPluginUrl'));
             $journal =& Request::getJournal();
             Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_MANAGER));
             $this->import('PhpMyVisitesSettingsForm');
             $form = new PhpMyVisitesSettingsForm($this, $journal->getId());
             if (Request::getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     Request::redirect(null, 'manager', 'plugin');
                     return false;
                 } else {
                     $this->setBreadCrumbs(true);
                     $form->display();
                 }
             } else {
                 $this->setBreadCrumbs(true);
                 $form->initData();
                 $form->display();
             }
             return true;
         default:
             // Unknown management verb
             assert(false);
             return false;
     }
 }