public function setFromPOST(array $settings = array())
 {
     parent::setFromPOST($settings);
     if ($this->get('validator') == '') {
         $this->remove('validator');
     }
 }
Example #2
0
 public function setFromPOST($postdata)
 {
     parent::setFromPOST($postdata);
     if ($this->get('validator') == '') {
         $this->remove('validator');
     }
 }
 /**
  * This function permits parsing different field settings values
  *
  * @param array $settings
  *	the data array to initialize if necessary.
  */
 public function setFromPOST(array &$settings = array())
 {
     // call the default behavior
     parent::setFromPOST($settings);
     // declare a new setting array
     $new_settings = array();
     // set new settings
     $new_settings['sections'] = is_array($settings['sections']) ? implode(self::SEPARATOR, $settings['sections']) : (is_string($settings['sections']) ? $settings['sections'] : null);
     $new_settings['show_association'] = $settings['show_association'] == 'yes' ? 'yes' : 'no';
     $new_settings['deepness'] = General::intval($settings['deepness']);
     $new_settings['deepness'] = $new_settings['deepness'] < 1 ? null : $new_settings['deepness'];
     $new_settings['elements'] = empty($settings['elements']) ? null : $settings['elements'];
     $new_settings['mode'] = empty($settings['mode']) ? null : $settings['mode'];
     $new_settings['allow_new'] = $settings['allow_new'] == 'yes' ? 'yes' : 'no';
     $new_settings['allow_edit'] = $settings['allow_edit'] == 'yes' ? 'yes' : 'no';
     $new_settings['allow_link'] = $settings['allow_link'] == 'yes' ? 'yes' : 'no';
     $new_settings['allow_delete'] = $settings['allow_delete'] == 'yes' ? 'yes' : 'no';
     // save it into the array
     $this->setArray($new_settings);
 }
 /**
  * This function permits parsing different field settings values
  *
  * @param array $settings
  *	the data array to initialize if necessary.
  */
 public function setFromPOST(array $settings = array())
 {
     // call the default behavior
     parent::setFromPOST($settings);
     // declare a new setting array
     $new_settings = array();
     // always display in table mode
     $new_settings['show_column'] = 'yes';
     // set new settings
     $new_settings['field-classes'] = $settings['field-handles'];
     //var_dump(isset($settings['table-width']));die;
     $new_settings['table-width'] = isset($settings['table-width']) ? $settings['table-width'] : NULL;
     $new_settings['table-height'] = isset($settings['table-height']) ? $settings['table-height'] : NULL;
     $new_settings['table-resize'] = isset($settings['table-resize']) ? $settings['table-resize'] : NULL;
     $new_settings['table-position'] = isset($settings['table-position']) ? $settings['table-position'] : NULL;
     $new_settings['table-absolute'] = isset($settings['table-absolute']) && $settings['table-absolute'] == 'on' ? 'yes' : 'no';
     $new_settings['entry-width'] = isset($settings['entry-width']) ? $settings['entry-width'] : NULL;
     $new_settings['entry-height'] = isset($settings['entry-height']) ? $settings['entry-height'] : NULL;
     $new_settings['entry-resize'] = isset($settings['entry-resize']) ? $settings['entry-resize'] : NULL;
     $new_settings['entry-position'] = isset($settings['entry-position']) ? $settings['entry-position'] : NULL;
     $new_settings['entry-absolute'] = isset($settings['entry-absolute']) && $settings['entry-absolute'] == 'on' ? 'yes' : 'no';
     // save it into the array
     $this->setArray($new_settings);
 }
 /**
  * This function permits parsing different field settings values
  *
  * @param array $settings
  *	the data array to initialize if necessary.
  */
 public function setFromPOST(array $settings = array())
 {
     // call the default behavior
     parent::setFromPOST($settings);
     // declare a new setting array
     $new_settings = array();
     // set new settings
     $new_settings['unique'] = isset($settings['unique']) && $settings['unique'] == 'on' ? 'yes' : 'no';
     $new_settings['thumbs'] = isset($settings['thumbs']) && $settings['thumbs'] == 'on' ? 'yes' : 'no';
     $new_settings['driver'] = isset($settings['driver']) && is_array($settings['driver']) ? implode(',', $settings['driver']) : null;
     $new_settings['query_params'] = isset($settings['query_params']) && !!$settings['query_params'] ? $settings['query_params'] : null;
     $new_settings['force_ssl'] = isset($settings['force_ssl']) && $settings['force_ssl'] == 'on' ? 'yes' : 'no';
     $new_settings['unique_media'] = isset($settings['unique_media']) && $settings['unique_media'] == 'on' ? 'yes' : 'no';
     // save it into the array
     $this->setArray($new_settings);
 }