示例#1
0
 public function bindData($data = array())
 {
     // set raw input for textarea
     $post = $this->app->request->get('post', JREQUEST_ALLOWRAW);
     foreach ($data as $index => $instance_data) {
         if (isset($post['elements'][$this->identifier][$index]['value'])) {
             $data[$index]['value'] = $post['elements'][$this->identifier][$index]['value'];
         }
     }
     parent::bindData($data);
 }
示例#2
0
 public function bindData($data = array())
 {
     parent::bindData($data);
     foreach ($this as $self) {
         $value = $this->get('value', '');
         if (!empty($value)) {
             $tzoffset = $this->app->date->getOffset();
             $date = $this->app->date->create($value, $tzoffset);
             $value = $date->toSQL();
             $this->set('value', $value);
         }
         $valueend = $this->get('valueend', '');
         if (!empty($valueend)) {
             $tzoffset = $this->app->date->getOffset();
             $date = $this->app->date->create($valueend, $tzoffset);
             $valueend = $date->toSQL();
             $this->set('valueend', $valueend);
         }
     }
     // necesary for submission
     $this->rewind();
 }