library/Garp/Model/Behavior/Draftable.php
public function beforeFetch(&$args) {
        $model = $args[0];
        $is_cms = $model->isCmsContext();
        $is_preview = $this->_isPreview() && Garp_Auth::getInstance()->isLoggedIn();

        $force = $this->_force;
        if (($is_cms || $is_preview) && !$force) {
            // don't use in the CMS, or in preview mode
            return;
        }

        $model = &$args[0];
        $select = &$args[1];

        if ($this->_blockOfflineItems) {
            $this->addWhereClause($model, $select);
        }
    }
public function beforeFetch(&$args) {
        $model = $args[0];
        $is_cms = $model->isCmsContext();
        $is_preview = $this->_isPreview() && Garp_Auth::getInstance()->isLoggedIn();

        $force = $this->_force;
        if (($is_cms || $is_preview) && !$force) {
            // don't use in the CMS, or in preview mode
            return;
        }

        $model = &$args[0];
        $select = &$args[1];

        if ($this->_blockOfflineItems) {
            $this->addWhereClause($model, $select);
        }
    }
public function beforeFetch ( & $ args ) { $ model = $ args [ 0 ] ; $ is_cms = $ model -> isCmsContext ( ) ; $ is_preview = $ this -> _isPreview ( ) && Garp_Auth :: getInstance ( ) -> isLoggedIn ( ) ; $ force = $ this -> _force ; if ( ( $ is_cms || $ is_preview ) && ! $ force ) { // don't use in the CMS, or in preview mode return ; } $ model = & $ args [ 0 ] ; $ select = & $ args [ 1 ] ; if ( $ this -> _blockOfflineItems ) { $ this -> addWhereClause ( $ model , $ select ) ; } }
Before fetch callback.
Adds the WHERE clause.

@param array $args
@return void
Before fetch callback . Adds the WHERE clause .