source/Core/Model/BaseModel.php
protected function _addField($fieldName, $fieldStatus, $type = null, $length = null)
    {
        //preparation
        $fieldName = strtolower($fieldName);

        //adding field names element
        $this->_aFieldNames[$fieldName] = $fieldStatus;

        //already set?
        $fieldLongName = $this->_getFieldLongName($fieldName);
        if ($this->isPropertyLoaded($fieldLongName)) {
            return;
        }

        //defining the field
        $field = false;

        if (isset($type)) {
            $field = new Field();
            $field->fldtype = $type;
            //T2008-01-29
            //can't clone as the fields are objects and are not fully cloned
            $this->_blIsSimplyClonable = false;
        }

        if (isset($length)) {
            if (!$field) {
                $field = new Field();
            }
            $field->fldmax_length = $length;
            $this->_blIsSimplyClonable = false;
        }

        $this->$fieldLongName = $field;
    }
protected function _addField($fieldName, $fieldStatus, $type = null, $length = null)
    {
        //preparation
        $fieldName = strtolower($fieldName);

        //adding field names element
        $this->_aFieldNames[$fieldName] = $fieldStatus;

        //already set?
        $fieldLongName = $this->_getFieldLongName($fieldName);
        if ($this->isPropertyLoaded($fieldLongName)) {
            return;
        }

        //defining the field
        $field = false;

        if (isset($type)) {
            $field = new Field();
            $field->fldtype = $type;
            //T2008-01-29
            //can't clone as the fields are objects and are not fully cloned
            $this->_blIsSimplyClonable = false;
        }

        if (isset($length)) {
            if (!$field) {
                $field = new Field();
            }
            $field->fldmax_length = $length;
            $this->_blIsSimplyClonable = false;
        }

        $this->$fieldLongName = $field;
    }
protected function _addField ( $ fieldName , $ fieldStatus , $ type = null , $ length = null ) { //preparation $ fieldName = strtolower ( $ fieldName ) ; //adding field names element $ this -> _aFieldNames [ $ fieldName ] = $ fieldStatus ; //already set? $ fieldLongName = $ this -> _getFieldLongName ( $ fieldName ) ; if ( $ this -> isPropertyLoaded ( $ fieldLongName ) ) { return ; } //defining the field $ field = false ; if ( isset ( $ type ) ) { $ field = new Field ( ) ; $ field -> fldtype = $ type ; //T2008-01-29 //can't clone as the fields are objects and are not fully cloned $ this -> _blIsSimplyClonable = false ; } if ( isset ( $ length ) ) { if ( ! $ field ) { $ field = new Field ( ) ; } $ field -> fldmax_length = $ length ; $ this -> _blIsSimplyClonable = false ; } $ this -> $ fieldLongName = $ field ; }
Adds additional field to meta structure

@param string $fieldName   Field name
@param int    $fieldStatus Field name status. In derived classes it indicates multi language status.
@param string $type        Field type
@param string $length      Field Length

@return null
Adds additional field to meta structure