Files
kupshop/bundles/KupShop/ContentBundle/Repository/PageRepository.php
2025-08-02 16:30:27 +02:00

39 lines
792 B
PHP

<?php
namespace KupShop\ContentBundle\Repository;
use KupShop\ContentBundle\Entity\Page;
/**
* PageRepository.
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class PageRepository extends \Doctrine\ORM\EntityRepository
{
/**
* @param int|null $id
* @param string|null $label
* @param string|null $name
*
* @return Page
*/
public function findByParams($id = null, $label = null, $name = null)
{
if (isset($name)) {
return $this->findOneByName($name);
}
if (is_numeric($id)) {
return $this->findOneById($id);
}
if (isset($label)) {
return $this->findOneByLabel($label);
}
return null;
}
}