public function findLastCreatedOnline($qt) {
        $query_builder = $this->getBaseBuilder();
        $this->FilterByTranslationStatus($query_builder, PostTranslation::STATUS_PUBLISHED);

        $query_builder
//                ->orderBy("p.created_at", "ASC")
                ->setMaxResults($qt);

        return $query_builder;
    }
public function findLastCreatedOnline($qt) {
        $query_builder = $this->getBaseBuilder();
        $this->FilterByTranslationStatus($query_builder, PostTranslation::STATUS_PUBLISHED);

        $query_builder
//                ->orderBy("p.created_at", "ASC")
                ->setMaxResults($qt);

        return $query_builder;
    }
public function findLastCreatedOnline ( $ qt ) { $ query_builder = $ this -> getBaseBuilder ( ) ; $ this -> FilterByTranslationStatus ( $ query_builder , PostTranslation :: STATUS_PUBLISHED ) ; $ query_builder //                ->orderBy("p.created_at", "ASC") -> setMaxResults ( $ qt ) ; return $ query_builder ; }
Return a query for last crated post.

@param boolean $return_qb
@param \Doctrine\ORM\QueryBuilder $query_builder
@return type
Return a query for last crated post .