Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 1776 | Rev 1858 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1776 Rev 1855
Línea 109... Línea 109...
109
        
109
        
110
        $prototype = new Feed();
110
        $prototype = new Feed();
111
        return $this->executeFetchAllObject($select, $prototype);
111
        return $this->executeFetchAllObject($select, $prototype);
Línea -... Línea 112...
-
 
112
    }
-
 
113
    
-
 
114
    public function fetchAllDataTableForo($search, $page = 1, $records_per_page = 10, $order_field= 'id', $order_direction = 'ASC', $topic_id)
-
 
115
    {
-
 
116
        $prototype = new Feed();
-
 
117
        $select = $this->sql->select(self::_TABLE);
-
 
118
        $select->where->equalTo('topic_id', $topic_id);
-
 
119
        
-
 
120
        if($search) {
-
 
121
            $select->where->like('title', '%' . $search . '%');
-
 
122
        }
-
 
123
        $select->order($order_field . ' ' . $order_direction);
-
 
124
        
-
 
125
        
-
 
126
        
-
 
127
        $hydrator   = new ObjectPropertyHydrator();
-
 
128
        $resultset  = new HydratingResultSet($hydrator, $prototype);
-
 
129
        
-
 
130
        $adapter = new DbSelect($select, $this->sql, $resultset);
-
 
131
        $paginator = new Paginator($adapter);
-
 
132
        $paginator->setItemCountPerPage($records_per_page);
-
 
133
        $paginator->setCurrentPageNumber($page);
-
 
134
        
-
 
135
        
112
    }
136
        return $paginator;
113
    
137
    }
114
    /**
138
    /**
115
     *
139
     *
116
     * @param int $shared_feed_id
140
     * @param int $shared_feed_id