/** * @param null|TblPrivilege $tblPrivilege */ public function setTblPrivilege(TblPrivilege $tblPrivilege = null) { $this->tblPrivilege = null === $tblPrivilege ? null : $tblPrivilege->getId(); }
/** * * @param TblPrivilege $tblPrivilege * * @return bool|TblRight[] */ public function getRightAllByPrivilege(TblPrivilege $tblPrivilege) { /** @var TblPrivilegeRight[] $EntityList */ $EntityList = $this->Connection->getEntityManager()->getEntity('TblPrivilegeRight')->findBy(array(TblPrivilegeRight::ATTR_TBL_PRIVILEGE => $tblPrivilege->getId())); array_walk($EntityList, function (TblPrivilegeRight &$V) { $V = $V->getTblRight(); }); return null === $EntityList ? false : $EntityList; }