vendor/sylius/sylius/src/Sylius/Component/Core/Model/AdminUser.php line 18

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Component\Core\Model;
  12. use Sylius\Component\User\Model\User;
  13. class AdminUser extends User implements AdminUserInterface
  14. {
  15.     /**
  16.      * @var string|null
  17.      */
  18.     protected $firstName;
  19.     /**
  20.      * @var string|null
  21.      */
  22.     protected $lastName;
  23.     /**
  24.      * @var string|null
  25.      */
  26.     protected $localeCode;
  27.     /**
  28.      * @var ImageInterface|null
  29.      */
  30.     protected $avatar;
  31.     public function __construct()
  32.     {
  33.         parent::__construct();
  34.         $this->roles = [AdminUserInterface::DEFAULT_ADMIN_ROLE];
  35.     }
  36.     public function getFirstName(): ?string
  37.     {
  38.         return $this->firstName;
  39.     }
  40.     public function setFirstName(?string $firstName): void
  41.     {
  42.         $this->firstName $firstName;
  43.     }
  44.     public function getLastName(): ?string
  45.     {
  46.         return $this->lastName;
  47.     }
  48.     public function setLastName(?string $lastName): void
  49.     {
  50.         $this->lastName $lastName;
  51.     }
  52.     public function getLocaleCode(): ?string
  53.     {
  54.         return $this->localeCode;
  55.     }
  56.     public function setLocaleCode(?string $code): void
  57.     {
  58.         $this->localeCode $code;
  59.     }
  60.     public function getImage(): ?ImageInterface
  61.     {
  62.         return $this->avatar;
  63.     }
  64.     public function setImage(?ImageInterface $image): void
  65.     {
  66.         $image->setOwner($this);
  67.         $this->avatar $image;
  68.     }
  69.     public function getAvatar(): ?ImageInterface
  70.     {
  71.         return $this->getImage();
  72.     }
  73.     public function setAvatar(?ImageInterface $avatar): void
  74.     {
  75.         $this->setImage($avatar);
  76.     }
  77. }