Exemple #1
0
 private static function editForm($data = array())
 {
     $configurationXmlFile = dirname(__FILE__) . '/forms/slider.xml';
     N2Loader::import('libraries.form.form');
     $form = new N2Form(N2Base::getApplication('smartslider')->getApplicationType('backend'));
     $form->set('class', 'nextend-smart-slider-admin');
     $form->loadArray($data);
     $form->loadXMLFile($configurationXmlFile);
     echo $form->render('slider');
     N2Loader::import('libraries.form.element.url');
     N2JS::addFirstCode('nextend.NextendElementUrlParams=' . N2ElementUrl::getNextendElementUrlParameters() . ';');
     return $data;
 }
Exemple #2
0
 function setValue($value)
 {
     return $this->_form->set($this->_name, $value);
 }
 public function generatorSpecificForm($group, $type, $data = array())
 {
     $info = $this->getGeneratorInfo($group, $type);
     $xmlPath = $info->path . '/config.xml';
     $form = new N2Form();
     $form->loadArray($data);
     $form->loadXMLFile($xmlPath);
     $form->set('info', $info);
     echo $form->render('generator');
     return $xmlPath;
 }