dashboard widgets are configurable via config (#269)

This commit is contained in:
Kevin Papst
2018-08-17 23:17:02 +02:00
committed by GitHub
parent 7804ef83ce
commit dbbb434723
49 changed files with 2011 additions and 938 deletions

View File

@@ -10,7 +10,6 @@
namespace App\Repository;
use App\Entity\User;
use App\Model\UserStatistic;
use App\Repository\Query\UserQuery;
use Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface;
@@ -29,21 +28,11 @@ class UserRepository extends AbstractRepository implements UserLoaderInterface
}
/**
* Return statistic data for all user.
*
* @return UserStatistic
* @throws \Doctrine\ORM\NonUniqueResultException
* @return int
*/
public function getGlobalStatistics()
public function countUser()
{
$countAll = $this->getEntityManager()
->createQuery('SELECT COUNT(u.id) FROM ' . User::class . ' u')
->getSingleScalarResult();
$stats = new UserStatistic();
$stats->setTotalAmount($countAll);
return $stats;
return $this->count([]);
}
/**