/** * * @param array $field the field attributes * @param mixed $id the id of the source record if available */ public function __construct($field, $id = false) { parent::__construct($field); $this->assign_props($field, __CLASS__); $this->record_id = $id; //error_log(__METHOD__.' instantiated:'.print_r($this,1)); }
/** * instantiates a field group object * * @param object a object with all the field group's properties */ public function __construct($group, $module) { // set up the common porperties parent::__construct($group); // load the object properties $this->assign_props($group, __CLASS__); // set the field count for the group $this->_field_count = count((array) $group->fields); $this->module = $module; }
/** * instantiates a field group object * * @param object a object with all the field group's properties */ public function __construct($fields, $id, $module = 'none') { $this->module = $module; // set up the common properties parent::__construct($fields); // get rid of unneeded properties unset($this->name, $this->title); // add the record field objects // this needs to by typed as array for the iterators to work $this->fields = (array) $fields; $this->record_id = $id; $this->values = Participants_Db::get_participant($id); }