Esempio n. 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);
 }
Esempio n. 2
0
 /**
  * Set data through data array.
  * @param array $data
  */
 public function bindData($data = array())
 {
     parent::bindData($data);
     foreach ($this as $self) {
         $value = $this->get('value', '');
         if (!empty($value) && ($value = strtotime($value)) && ($value = strftime(self::EDIT_DATE_FORMAT, $value))) {
             $tzoffset = $this->app->date->getOffset();
             $date = $this->app->date->create($value, $tzoffset);
             $value = $date->toSQL();
             $this->set('value', $value);
         }
     }
 }