34 lines
671 B
PHP
34 lines
671 B
PHP
<?php
|
|
namespace App;
|
|
|
|
use Kdyby;
|
|
use Nette;
|
|
|
|
class Translations extends Nette\Object
|
|
{
|
|
private $em;
|
|
private $translations;
|
|
|
|
public function __construct(Kdyby\Doctrine\EntityManager $em)
|
|
{
|
|
$this->em = $em;
|
|
$this->translations = $em->getRepository(Translation::class);
|
|
}
|
|
|
|
public function find($value)
|
|
{
|
|
return $this->translations->find($value);
|
|
}
|
|
|
|
|
|
public function findBy($criteria = [],$orderBy = [])
|
|
{
|
|
return $this->translations->findBy($criteria,$orderBy);
|
|
}
|
|
|
|
public function findPairs($criteria,$value,$orderBy,$key)
|
|
{
|
|
return $this->translations->findPairs($criteria,$value,$orderBy,$key);
|
|
}
|
|
}
|