library/Garp/Model/Behavior/Article.php
public function bindWithChapters(Garp_Model_Db &$model) {
        $chapterModel = new Model_Chapter();
        $contentNodeModel = new Model_ContentNode();
        $contentNodeModel->setCmsContext($model->isCmsContext());
        $chapterModel->bindModel(
            'content', array('modelClass' => $contentNodeModel)
        );

        foreach ($this->_config['contentTypes'] as $chapterType) {
            $chapterAlias = $this->_extractContentTypeAlias($chapterType);
            $options = $this->_extractContentTypeBindOptions($chapterType, $contentNodeModel);
            $contentNodeModel->bindModel($chapterAlias, $options);
        }

        $model->bindModel(
            'chapters', array('modelClass' => $chapterModel)
        );
    }
public function bindWithChapters(Garp_Model_Db &$model) {
        $chapterModel = new Model_Chapter();
        $contentNodeModel = new Model_ContentNode();
        $contentNodeModel->setCmsContext($model->isCmsContext());
        $chapterModel->bindModel(
            'content', array('modelClass' => $contentNodeModel)
        );

        foreach ($this->_config['contentTypes'] as $chapterType) {
            $chapterAlias = $this->_extractContentTypeAlias($chapterType);
            $options = $this->_extractContentTypeBindOptions($chapterType, $contentNodeModel);
            $contentNodeModel->bindModel($chapterAlias, $options);
        }

        $model->bindModel(
            'chapters', array('modelClass' => $chapterModel)
        );
    }
public function bindWithChapters ( Garp_Model_Db & $ model ) { $ chapterModel = new Model_Chapter ( ) ; $ contentNodeModel = new Model_ContentNode ( ) ; $ contentNodeModel -> setCmsContext ( $ model -> isCmsContext ( ) ) ; $ chapterModel -> bindModel ( 'content' , array ( 'modelClass' => $ contentNodeModel ) ) ; foreach ( $ this -> _config [ 'contentTypes' ] as $ chapterType ) { $ chapterAlias = $ this -> _extractContentTypeAlias ( $ chapterType ) ; $ options = $ this -> _extractContentTypeBindOptions ( $ chapterType , $ contentNodeModel ) ; $ contentNodeModel -> bindModel ( $ chapterAlias , $ options ) ; } $ model -> bindModel ( 'chapters' , array ( 'modelClass' => $ chapterModel ) ) ; }
Bind all the Chapters and ContentNodes to fetch the complete Article.

@param Garp_Model_Db $model
@return void
Bind all the Chapters and ContentNodes to fetch the complete Article .