/**
  * @param null|TblCategory $tblCategory
  */
 public function setTblCategory(TblCategory $tblCategory = null)
 {
     $this->tblCategory = null === $tblCategory ? null : $tblCategory->getId();
 }
Пример #2
0
 /**
  * @param TblCategory $tblCategory
  *
  * @return bool|TblSubject[]
  */
 public function getSubjectAllByCategory(TblCategory $tblCategory)
 {
     /** @var TblCategorySubject[] $EntityList */
     $EntityList = $this->Connection->getEntityManager()->getEntity('TblCategorySubject')->findBy(array(TblCategorySubject::ATTR_TBL_CATEGORY => $tblCategory->getId()));
     array_walk($EntityList, function (TblCategorySubject &$V) {
         $V = $V->getTblSubject();
     });
     return null === $EntityList ? false : $EntityList;
 }