GOT THIS ERROR在null CAKE PHP上调用成员函数parseCriteria()

时间:2015-02-25 07:01:14

标签: php cakephp

GOT THIS ERROR在null CAK上调用成员函数parseCriteria() `

CONTROLLER

class ProductsController extends AppController {

    public $components = array('Search.Prg');

    public function index() {

        // start a standard search

        $this->Prg->commonProcess();

        // process the URL parameters

        $params = $this->Prg->parsedParams();

        // generate the Paginator conditions

        $conditions = $this->Product->parseCriteria($params);
        // add the conditions for paging

        $this->Paginator->settings['conditions'] = $conditions;

        $this->set('products', $this->Paginator->paginate());
    }
}

MODEL

class Product extends AppModel {

    public $actsAs = array('Search.Searchable');

    public $filterArgs = array(

        'product' => array(

            'type' => 'like',

            'field' => 'name'
        )
    );
}

查看

echo $this->Form->create();

echo $this->Form->input('product');

echo $this->Form->end(__('Search'));'

0 个答案:

没有答案