/**
  * Display form to create/edit a search form element.
  * @param $args array optional, if set the first parameter is the ID of the search form element to edit
  */
 function editSearchFormElement($args, &$request)
 {
     $this->validate();
     $this->setupTemplate($request, true);
     $plugin =& $this->getPlugin();
     $plugin->import('SearchFormElementForm');
     $searchFormElementForm = new SearchFormElementForm($plugin->getName(), !isset($args) || empty($args) ? null : (int) $args[0]);
     if ($searchFormElementForm->isLocaleResubmit()) {
         $searchFormElementForm->readInputData();
     } else {
         $searchFormElementForm->initData();
     }
     $searchFormElementForm->display();
 }
 /**
  * Display form to create/edit a search form element.
  * @param $args array optional, if set the first parameter is the ID of the search form element to edit
  */
 function editSearchFormElement($args = array())
 {
     $this->validate();
     $this->setupTemplate(true);
     $plugin =& $this->getPlugin();
     $plugin->import('SearchFormElementForm');
     if (checkPhpVersion('5.0.0')) {
         // WARNING: This form needs $this in constructor
         $searchFormElementForm = new SearchFormElementForm(!isset($args) || empty($args) ? null : (int) $args[0]);
     } else {
         $searchFormElementForm =& new SearchFormElementForm(!isset($args) || empty($args) ? null : (int) $args[0]);
     }
     if ($searchFormElementForm->isLocaleResubmit()) {
         $searchFormElementForm->readInputData();
     } else {
         $searchFormElementForm->initData();
     }
     $searchFormElementForm->display();
 }