Actualización
This commit is contained in:
26
plugin/toplinks/src/Entity/Repository/TopLinkRepository.php
Normal file
26
plugin/toplinks/src/Entity/Repository/TopLinkRepository.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/* For license terms, see /license.txt */
|
||||
|
||||
namespace Chamilo\PluginBundle\Entity\TopLinks\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* Class TopLinkRepository.
|
||||
*
|
||||
* @package Chamilo\PluginBundle\Entity\TopLinks
|
||||
*/
|
||||
class TopLinkRepository extends EntityRepository
|
||||
{
|
||||
public function all($offset, $limit, $column, $direction): array
|
||||
{
|
||||
$orderBy = ['title' => $direction];
|
||||
|
||||
if (1 == $column) {
|
||||
$orderBy = ['url' => $direction];
|
||||
}
|
||||
|
||||
return parent::findBy([], $orderBy, $limit, $offset);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user