vendor/pimcore/pimcore/models/Staticroute/Listing.php line 68

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under two different licenses:
  6.  * - GNU General Public License version 3 (GPLv3)
  7.  * - Pimcore Commercial License (PCL)
  8.  * Full copyright and license information is available in
  9.  * LICENSE.md which is distributed with this source code.
  10.  *
  11.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.  *  @license    http://www.pimcore.org/license     GPLv3 and PCL
  13.  */
  14. namespace Pimcore\Model\Staticroute;
  15. use Pimcore\Model;
  16. use Pimcore\Model\Listing\CallableFilterListingInterface;
  17. use Pimcore\Model\Listing\CallableOrderListingInterface;
  18. use Pimcore\Model\Listing\JsonListing;
  19. use Pimcore\Model\Listing\Traits\FilterListingTrait;
  20. use Pimcore\Model\Listing\Traits\OrderListingTrait;
  21. /**
  22.  * @method \Pimcore\Model\Staticroute\Listing\Dao getDao()
  23.  * @method int getTotalCount()
  24.  */
  25. class Listing extends JsonListing implements CallableFilterListingInterfaceCallableOrderListingInterface
  26. {
  27.     use FilterListingTrait;
  28.     use OrderListingTrait;
  29.     /**
  30.      * @var \Pimcore\Model\Staticroute[]|null
  31.      */
  32.     protected $routes null;
  33.     /**
  34.      * @return \Pimcore\Model\Staticroute[]
  35.      */
  36.     public function getRoutes()
  37.     {
  38.         if ($this->routes === null) {
  39.             $this->getDao()->loadList();
  40.         }
  41.         return $this->routes;
  42.     }
  43.     /**
  44.      * @param \Pimcore\Model\Staticroute[]|null $routes
  45.      *
  46.      * @return $this
  47.      */
  48.     public function setRoutes($routes)
  49.     {
  50.         $this->routes $routes;
  51.         return $this;
  52.     }
  53.     /**
  54.      * @return Model\Staticroute[]
  55.      */
  56.     public function load()
  57.     {
  58.         return $this->getRoutes();
  59.     }
  60. }