/** * {@inheritdoc} */ public function loadUserByUsername($username) { $user = $this->userRepository->findOneByIdentifier($username); if (!$user) { throw new UsernameNotFoundException(sprintf('User with username "%s" does not exist.', $username)); } return $user; }
/** * {@inheritdoc} */ public function collect() { return ['nb_channels' => $this->channelRepository->countAll(), 'nb_locales' => $this->localeRepository->countAllActivated(), 'nb_products' => $this->productRepository->countAll(), 'nb_attributes' => $this->attributeRepository->countAll(), 'nb_families' => $this->familyRepository->countAll(), 'nb_users' => $this->userRepository->countAll()]; }