src/Model/Tables/MelisGenericTable.php
public function getDataForExport($filter, $columns = array())
	{
        $select = $this->tableGateway->getSql()->select();
        $select->columns(array('*'));
        
        $w = new Where();
        $filters = array();
        $likes = array();
        
        foreach($columns as $columnKeys) 
        {
            $likes[] = new Like($columnKeys, '%'.$filter.'%');
        }
        
        $filters = array(new PredicateSet($likes, PredicateSet::COMBINED_BY_OR));
        
        $select->where($filters);
        
        $resultSet = $this->tableGateway->selectWith($select);
        
        return $resultSet;
        
	}
public function getDataForExport($filter, $columns = array())
	{
        $select = $this->tableGateway->getSql()->select();
        $select->columns(array('*'));
        
        $w = new Where();
        $filters = array();
        $likes = array();
        
        foreach($columns as $columnKeys) 
        {
            $likes[] = new Like($columnKeys, '%'.$filter.'%');
        }
        
        $filters = array(new PredicateSet($likes, PredicateSet::COMBINED_BY_OR));
        
        $select->where($filters);
        
        $resultSet = $this->tableGateway->selectWith($select);
        
        return $resultSet;
        
	}
public function getDataForExport ( $ filter , $ columns = array ( ) ) { $ select = $ this -> tableGateway -> getSql ( ) -> select ( ) ; $ select -> columns ( array ( '*' ) ) ; $ w = new Where ( ) ; $ filters = array ( ) ; $ likes = array ( ) ; foreach ( $ columns as $ columnKeys ) { $ likes [ ] = new Like ( $ columnKeys , '%' . $ filter . '%' ) ; } $ filters = array ( new PredicateSet ( $ likes , PredicateSet :: COMBINED_BY_OR ) ) ; $ select -> where ( $ filters ) ; $ resultSet = $ this -> tableGateway -> selectWith ( $ select ) ; return $ resultSet ; }
Returns all the data from the selected column
@param String $filter
@param array $columns
@return Array
Returns all the data from the selected column