added API functions to save meta fields (#1063)

This commit is contained in:
Kevin Papst
2019-08-26 14:30:39 +02:00
committed by GitHub
parent ceeec7b8a6
commit 15673555a2
14 changed files with 624 additions and 68 deletions

View File

@@ -22,6 +22,20 @@ use Pagerfanta\Pagerfanta;
class TeamRepository extends EntityRepository
{
public function find($id, $lockMode = null, $lockVersion = null)
{
/** @var Team|null $team */
$team = parent::find($id, $lockMode, $lockVersion);
if (null === $team) {
return null;
}
$loader = new TeamLoader($this->getEntityManager());
$loader->loadResults([$team]);
return $team;
}
/**
* @param Team $team
* @throws ORMException