Skip to content

Instantly share code, notes, and snippets.

View iNaD's full-sized avatar

Daniel Gehn iNaD

View GitHub Profile
@sthamann
sthamann / gist:5668095
Created May 29, 2013 05:08
Usage doctrine sql logger
$logger = new \Doctrine\DBAL\Logging\DebugStack();
$logger->enabled;
Shopware()->Models()->getConfiguration()->setSQLLogger($logger);
// Shopware Doctrine Queries
//get access on the customer repository
$query = $this->getRepository()->getListQuery($filter, $customerGroup, $sort, $limit, $offset);
//returns the total count of the query
$totalResult = $this->getManager()->getQueryCount($query);