Esempio n. 1
0
 function action_before()
 {
     $groups = $this->context->get_group_handle()->set_where('site_id = %d', $this->get_site_id())->load();
     if ($this->params->gid) {
         $group = $groups->get_item_by_id($this->params->gid);
         $group->set_data('current', true);
         $this->response->group = $group->render();
     } else {
         $this->disable_render(true);
     }
     // groups
     $this->response->groups = $groups->render();
     // field types
     $this->response->field_types = extrafs_field_collection::get_types();
 }
Esempio n. 2
0
 /**
  * update fields
  * data['field']
  *
  * @param mixed $data
  */
 function sat_update_fields($data, $parent)
 {
     // core::var_dump(get_class($this->get_container()->get_parent()));
     $this->get_fields();
     if (!$this->_fields->count()) {
         return $this;
     }
     core::dprint(array('group_item::sat_update_fields (%s)', $this->name), core::E_DEBUG4);
     $this->_fields->update_field_values($data);
     /*
     foreach ($this->_fields as $f) {
        $g->updaget_field_values();
     }
     */
     // foreach ($this as $i) {
     //$i->sat_update_fields(@$data[$g->name]);
     // }
 }
Esempio n. 3
0
 function construct_after()
 {
     $this->real_value = false;
     if (!empty($this->value)) {
         $this->real_value = unserialize($this->value);
     }
     $this->type_string = '';
     if ($this->type) {
         $this->type_string = extrafs_field_collection::get_type($this->type);
     }
 }