コード例 #1
0
 public function findAllCompetencesInUserCompetencesDQL(Competence $competence)
 {
     $query = $this->_em->createQuery('SELECT c FROM CentraleLilleKnowledgeBundle:UserCompetence c JOIN c.competence b WHERE b.id = :competence');
     $query->setParameter('competence', $competence->getId());
     $results = $query->getResult();
     return $results;
 }
コード例 #2
0
 public function createCompetence($name)
 {
     if ($name == null) {
         return false;
     } else {
         $competence = new Competence();
         $competence->setName($name);
         $this->em->persist($competence);
         $this->em->flush();
         return true;
     }
 }