public function log($type, $text, $source='')
    {
        $log = new Logs();
        $log->setType($type);
        $log->setSource($source);
        $log->setContent($text);

        $this->em->persist($log);
        $this->em->flush();

        return $log;
    }