getFilterValue() public method

public getFilterValue ( $code )
コード例 #1
0
    /**
     *
     * @param $message
     * @param $simulation
     * @return Gpf_Rpc_Form
     */
    private function action(Gpf_Rpc_Params $params, $message = '', $simulation = false) {
        $data = new Gpf_Rpc_Data($params);

        $filters = new Gpf_Rpc_FilterCollection($params);
        if ($filters->getFilterValue('reachedCondition') == Gpf::YES) {
            $data->setValue('message', $message);
            return $data;
        }

        $compressedCommissionProcesor = new Pap_Features_CompressedCommissionPlacementModel_Processor();
        $output = $compressedCommissionProcesor->recalculate($params->get('filters'), $simulation);

        $data->setValue('message', $output);
        return $data;
    }
コード例 #2
0
    /**
     * @return Gpf_SqlBuilder_SelectBuilder
     */
    protected function createSelectBuilder() {
        $filters = new Gpf_Rpc_FilterCollection($this->params);
        
        $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add('v.'.Gpf_Db_Table_Views::ID, self::ID);
        $selectBuilder->select->add('v.'.Gpf_Db_Table_Views::NAME, self::VALUE);
        $selectBuilder->from->add(Gpf_Db_Table_Views::getName(), 'v');

        $whereCond = new Gpf_SqlBuilder_CompoundWhereCondition();
        $whereCond->add('v.' . Gpf_Db_Table_Views::ACCOUNTUSERID, '=', Gpf_Session::getAuthUser()->getUserData()->get(Gpf_Db_Table_Users::ID));
        $whereCond->add('v.' . Gpf_Db_Table_Views::ACCOUNTUSERID, '=', '', 'OR');
        
        $selectBuilder->where->addCondition($whereCond);
        if ($filters->isFilter('viewtype')) {
            $selectBuilder->where->add('v.' . Gpf_Db_Table_Views::VIEWTYPE, '=', $filters->getFilterValue('viewtype'));
        }
        return $selectBuilder;
    }
コード例 #3
0
	private function setActionAndCommissionId(Gpf_Rpc_FilterCollection $filters) {
	    $this->action = $filters->getFilterValue('action');
	    $this->commTypeId = $filters->getFilterValue('commtypeid');
	}
コード例 #4
0
    /**
     * @param Gpf_Rpc_Params $params
     * @return Pap_Stats_Params
     */
    private function init(Gpf_Rpc_Params $params) {
        $filterCollection = new Gpf_Rpc_FilterCollection($params);

        $this->chartType = $filterCollection->getFilterValue("chartType");
        $this->timeGroupBy = $filterCollection->getFilterValue("groupBy");

        try {
            $this->dataType1 = $this->getDataType($filterCollection->getFilterValue("dataType1"));
        } catch (Gpf_Exception $e) {
            $this->dataType1 = $this->getDataType($this->getDefaultDataType());
        }

        try {
            $this->dataType2 = $this->getDataType($filterCollection->getFilterValue("dataType2"));
        } catch (Gpf_Exception $e) {
            $this->dataType2 = null;
        }
        
        $this->initStatParams($filterCollection);
    }