vendor/pimcore/pimcore/lib/Model/Dao/DaoTrait.php line 43

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\Dao;
  15. /**
  16.  * @internal
  17.  */
  18. trait DaoTrait
  19. {
  20.     /**
  21.      * @var \Pimcore\Model\AbstractModel
  22.      */
  23.     protected $model;
  24.     /**
  25.      * @param \Pimcore\Model\AbstractModel $model
  26.      *
  27.      * @return $this
  28.      */
  29.     public function setModel($model)
  30.     {
  31.         $this->model $model;
  32.         return $this;
  33.     }
  34.     /**
  35.      * @param array $data
  36.      */
  37.     protected function assignVariablesToModel($data)
  38.     {
  39.         $this->model->setValues($data);
  40.     }
  41. }