mirror of
				https://github.com/alchemy-fr/Phraseanet.git
				synced 2025-10-26 11:23:13 +00:00 
			
		
		
		
	 12f9575a8b
			
		
	
	12f9575a8b
	
	
	
		
			
			Conflicts: lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php lib/classes/API/OAuth2/Adapter.php lib/classes/API/V1/adapter.php lib/classes/Feed/Adapter.php lib/classes/Feed/Collection.php lib/classes/Feed/Entry/Adapter.php lib/classes/Feed/Entry/Item.php lib/classes/Feed/Publisher/Adapter.php lib/classes/User/Adapter.php lib/classes/base.php lib/classes/connection.php lib/classes/databox/cgu.php lib/classes/eventsmanager/notify/autoregister.php lib/classes/eventsmanager/notify/bridgeuploadfail.php lib/classes/eventsmanager/notify/order.php lib/classes/eventsmanager/notify/orderdeliver.php lib/classes/eventsmanager/notify/ordernotdelivered.php lib/classes/eventsmanager/notify/push.php lib/classes/eventsmanager/notify/register.php lib/classes/eventsmanager/notify/validate.php lib/classes/eventsmanager/notify/validationdone.php lib/classes/eventsmanager/notify/validationreminder.php lib/classes/module/console/taskState.php lib/classes/module/console/taskrun.php lib/classes/record/adapter.php lib/classes/registry.php lib/classes/set/order.php lib/classes/task/abstract.php lib/classes/task/appboxAbstract.php lib/classes/task/databoxAbstract.php lib/classes/task/manager.php lib/classes/task/period/RecordMover.php lib/classes/task/period/apibridge.php lib/classes/task/period/archive.php lib/classes/task/period/ftp.php lib/classes/task/period/ftpPull.php templates/web/prod/upload/lazaret.html.twig
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| /*
 | |
|  * This file is part of Phraseanet
 | |
|  *
 | |
|  * (c) 2005-2014 Alchemy
 | |
|  *
 | |
|  * For the full copyright and license information, please view the LICENSE
 | |
|  * file that was distributed with this source code.
 | |
|  */
 | |
| 
 | |
| namespace Alchemy\Phrasea\Model\Repositories;
 | |
| 
 | |
| use Doctrine\ORM\EntityRepository;
 | |
| use Doctrine\ORM\Tools\Pagination\Paginator;
 | |
| 
 | |
| /**
 | |
|  * LazaretFileRepository
 | |
|  *
 | |
|  * This class was generated by the Doctrine ORM. Add your own custom
 | |
|  * repository methods below.
 | |
|  */
 | |
| class LazaretFileRepository extends EntityRepository
 | |
| {
 | |
|     public function findPerPage(array $base_ids, $offset = 0, $perPage = 10)
 | |
|     {
 | |
|         $base_ids = implode(', ', array_map(function ($int) {
 | |
|             return (int) $int;
 | |
|         }, $base_ids));
 | |
| 
 | |
|         $dql = '
 | |
|             SELECT f
 | |
|             FROM Phraseanet:LazaretFile f'
 | |
|             . ('' === $base_ids ? '' : ' WHERE f.base_id IN  (' . $base_ids . ')')
 | |
|             . ' ORDER BY f.id DESC';
 | |
| 
 | |
|         $query = $this->_em->createQuery($dql);
 | |
|         $query->setFirstResult($offset)
 | |
|             ->setMaxResults($perPage);
 | |
| 
 | |
|         return new Paginator($query, true);
 | |
|     }
 | |
| }
 |