public function fields()
{
$args = func_get_args();
if(isset($args[0]) && is_array($args[0]))
{
$args = $args[0];
}
$this->add_fields = $args;
$this->edit_fields = $args; //!!!!!!!!!!!!
return $this;
}
In unset_edit_fields:
protected function get_edit_fields()
{
if($this->edit_fields_checked === false)
{
$field_types = $this->get_field_types();
if(!empty($this->edit_fields)) //!!!!!!!!!!!
{
/*
.....
*/
}
else
{
/*
If i used fields() $this->edit_fields not empty! FAIL!
*/
$this->edit_fields = array();
foreach($field_types as $field)
{
//Check if an unset_edit_field is initialize for this field name
if($this->unset_edit_fields !== null && is_array($this->unset_edit_fields) && in_array($field->name,$this->unset_edit_fields))
continue;
/*
.....
*/
*/
}
$this->edit_fields_checked = true;
}
return $this->edit_fields;
}