app/control/communication/SystemSharedDocumentList.class.php
/**
     * Register the filter in the session
     */
Register the filter in the session
Register the filter in the session
public function onSearch()
    {
        $data = $this->form->getData();
        TSession::setValue('SystemDocumentList_filter_title',   NULL);
        TSession::setValue('SystemDocumentList_filter_category_id',   NULL);
        if (isset($data->title) AND ($data->title)) {
            $filter = new TFilter('title', 'like', "%{$data->title}%"); 
            TSession::setValue('SystemDocumentList_filter_title',   $filter); 
        }
        if (isset($data->category_id) AND ($data->category_id)) {
            $filter = new TFilter('category_id', '=', "$data->category_id"); 
            TSession::setValue('SystemDocumentList_filter_category_id',   $filter); 
        }
        $this->form->setData($data);
        TSession::setValue('SystemDocument_filter_data', $data);
        $param=array();
        $param['offset']    =0;
        $param['first_page']=1;
        $this->onReload($param);
    }
public function onSearch ( ) { $ data = $ this -> form -> getData ( ) ; TSession :: setValue ( 'SystemDocumentList_filter_title' , NULL ) ; TSession :: setValue ( 'SystemDocumentList_filter_category_id' , NULL ) ; if ( isset ( $ data -> title ) AND ( $ data -> title ) ) { $ filter = new TFilter ( 'title' , 'like' , " % { $ data -> title } % " ) ; TSession :: setValue ( 'SystemDocumentList_filter_title' , $ filter ) ; } if ( isset ( $ data -> category_id ) AND ( $ data -> category_id ) ) { $ filter = new TFilter ( 'category_id' , '=' , " $ data -> category_id " ) ; TSession :: setValue ( 'SystemDocumentList_filter_category_id' , $ filter ) ; } $ this -> form -> setData ( $ data ) ; TSession :: setValue ( 'SystemDocument_filter_data' , $ data ) ; $ param = array ( ) ; $ param [ 'offset' ] = 0 ; $ param [ 'first_page' ] = 1 ; $ this -> onReload ( $ param ) ; }
Register the filter in the session
Register the filter in the session
// get the search form data // clear session filters // create the filter // stores the filter in the session // create the filter // stores the filter in the session // fill the form with data again // keep the search data in the session