application/modules/g/controllers/BrowseboxController.php
protected function _initBrowsebox(Zend_Controller_Request_Abstract $request) {
        $bb = Garp_Browsebox::factory($request->getParam('id'));

        if ($request->getParam('conditions')) {
            $options = unserialize(base64_decode($request->getParam('conditions')));
            if (!empty($options['filters'])) {
                $conditions = base64_decode($options['filters']);
                $conditions = explode(
                    Garp_Browsebox::BROWSEBOX_QUERY_FILTER_SEPARATOR,
                    $conditions
                );
                foreach ($conditions as $condition) {
                    $parts = explode(':', $condition);
                    if (count($parts) < 2) {
                        continue;
                    }
                    $filterId = $parts[0];
                    $params   = explode(
                        Garp_Browsebox::BROWSEBOX_QUERY_FILTER_PROP_SEPARATOR,
                        $parts[1]
                    );
                    $bb->setFilter($filterId, $params);
                }
            }

            unset($options['filters']);
            foreach ($options as $key => $value) {
                $bb->setOption($key, $value);
            }
        }

        $chunk = $request->getParam('chunk');
        if ($chunk < 1) {
            $chunk = 1;
        }
        $bb->init($chunk);
        return $bb;
    }
protected function _initBrowsebox(Zend_Controller_Request_Abstract $request) {
        $bb = Garp_Browsebox::factory($request->getParam('id'));

        if ($request->getParam('conditions')) {
            $options = unserialize(base64_decode($request->getParam('conditions')));
            if (!empty($options['filters'])) {
                $conditions = base64_decode($options['filters']);
                $conditions = explode(
                    Garp_Browsebox::BROWSEBOX_QUERY_FILTER_SEPARATOR,
                    $conditions
                );
                foreach ($conditions as $condition) {
                    $parts = explode(':', $condition);
                    if (count($parts) < 2) {
                        continue;
                    }
                    $filterId = $parts[0];
                    $params   = explode(
                        Garp_Browsebox::BROWSEBOX_QUERY_FILTER_PROP_SEPARATOR,
                        $parts[1]
                    );
                    $bb->setFilter($filterId, $params);
                }
            }

            unset($options['filters']);
            foreach ($options as $key => $value) {
                $bb->setOption($key, $value);
            }
        }

        $chunk = $request->getParam('chunk');
        if ($chunk < 1) {
            $chunk = 1;
        }
        $bb->init($chunk);
        return $bb;
    }
protected function _initBrowsebox ( Zend_Controller_Request_Abstract $ request ) { $ bb = Garp_Browsebox :: factory ( $ request -> getParam ( 'id' ) ) ; if ( $ request -> getParam ( 'conditions' ) ) { $ options = unserialize ( base64_decode ( $ request -> getParam ( 'conditions' ) ) ) ; if ( ! empty ( $ options [ 'filters' ] ) ) { $ conditions = base64_decode ( $ options [ 'filters' ] ) ; $ conditions = explode ( Garp_Browsebox :: BROWSEBOX_QUERY_FILTER_SEPARATOR , $ conditions ) ; foreach ( $ conditions as $ condition ) { $ parts = explode ( ':' , $ condition ) ; if ( count ( $ parts ) < 2 ) { continue ; } $ filterId = $ parts [ 0 ] ; $ params = explode ( Garp_Browsebox :: BROWSEBOX_QUERY_FILTER_PROP_SEPARATOR , $ parts [ 1 ] ) ; $ bb -> setFilter ( $ filterId , $ params ) ; } } unset ( $ options [ 'filters' ] ) ; foreach ( $ options as $ key => $ value ) { $ bb -> setOption ( $ key , $ value ) ; } } $ chunk = $ request -> getParam ( 'chunk' ) ; if ( $ chunk < 1 ) { $ chunk = 1 ; } $ bb -> init ( $ chunk ) ; return $ bb ; }
Fetch a Browsebox object configured based on parameters found in the request.

@param Zend_Controller_Request_Abstract $request The current request
@return Garp_Browsebox
Fetch a Browsebox object configured based on parameters found in the request .