library/Garp/Spawn/Relation.php
protected function _addRelationFieldInLocalModel() {
        if (!$this->isSingular()) {
            return;
        }

        $column = Garp_Spawn_Relation_Set::getRelationColumn($this->name);
        $fieldParams = array(
            'model' => $this->model,
            'type' => 'numeric',
            'editable' => true,
            'visible' => true,
            'primary' => $this->primary,
            'required' => $this->required,
            'relationAlias' => $this->name,
            'relationType' => $this->type
        );
        if ($this->multilingual && $this->_localModel->isMultilingual()) {
            // The relation is added to the i18n model by Garp_Spawn_Config_Model_I18n
            return;
        }
        $this->_localModel->fields->add('relation', $column, $fieldParams);
    }
protected function _addRelationFieldInLocalModel() {
        if (!$this->isSingular()) {
            return;
        }

        $column = Garp_Spawn_Relation_Set::getRelationColumn($this->name);
        $fieldParams = array(
            'model' => $this->model,
            'type' => 'numeric',
            'editable' => true,
            'visible' => true,
            'primary' => $this->primary,
            'required' => $this->required,
            'relationAlias' => $this->name,
            'relationType' => $this->type
        );
        if ($this->multilingual && $this->_localModel->isMultilingual()) {
            // The relation is added to the i18n model by Garp_Spawn_Config_Model_I18n
            return;
        }
        $this->_localModel->fields->add('relation', $column, $fieldParams);
    }
protected function _addRelationFieldInLocalModel ( ) { if ( ! $ this -> isSingular ( ) ) { return ; } $ column = Garp_Spawn_Relation_Set :: getRelationColumn ( $ this -> name ) ; $ fieldParams = array ( 'model' => $ this -> model , 'type' => 'numeric' , 'editable' => true , 'visible' => true , 'primary' => $ this -> primary , 'required' => $ this -> required , 'relationAlias' => $ this -> name , 'relationType' => $ this -> type ) ; if ( $ this -> multilingual && $ this -> _localModel -> isMultilingual ( ) ) { // The relation is added to the i18n model by Garp_Spawn_Config_Model_I18n return ; } $ this -> _localModel -> fields -> add ( 'relation' , $ column , $ fieldParams ) ; }
Registers this relation as a Field in the Model.

@return void
Registers this relation as a Field in the Model .