modules/QSL/ShopByBrand/src/Model/Image/Brand/Image.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
  4.  * See https://www.x-cart.com/license-agreement.html for license details.
  5.  */
  6. namespace QSL\ShopByBrand\Model\Image\Brand;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Category
  10.  *
  11.  * @ORM\Entity
  12.  * @ORM\Table  (name="brand_images")
  13.  */
  14. class Image extends \XLite\Model\Base\Image
  15. {
  16.     /**
  17.      * Relation to the brand entity.
  18.      *
  19.      * @var \QSL\ShopByBrand\Model\Brand
  20.      *
  21.      * @ORM\OneToOne   (targetEntity="QSL\ShopByBrand\Model\Brand", inversedBy="image")
  22.      * @ORM\JoinColumn (name="brand_id", referencedColumnName="brand_id", onDelete="CASCADE")
  23.      */
  24.     protected $brand;
  25.     /**
  26.      * The image "alt" attribute
  27.      *
  28.      * @var string
  29.      *
  30.      * @ORM\Column (type="string", length=255)
  31.      */
  32.     protected $alt '';
  33.     /**
  34.      * return the image "alt" attribute
  35.      *
  36.      * @return string
  37.      */
  38.     public function getAlt()
  39.     {
  40.         return $this->alt;
  41.     }
  42.     /**
  43.      * Set the image "alt" attribute
  44.      *
  45.      * @param string $alt New "alt" value
  46.      *
  47.      * @return Image
  48.      */
  49.     public function setAlt($alt)
  50.     {
  51.         $this->alt $alt;
  52.         return $this;
  53.     }
  54.     /**
  55.      * Get brand
  56.      *
  57.      * @return \QSL\ShopByBrand\Model\Brand
  58.      */
  59.     public function getBrand()
  60.     {
  61.         return $this->brand;
  62.     }
  63.     /**
  64.      * Set brand
  65.      *
  66.      * @param \QSL\ShopByBrand\Model\Brand $brand
  67.      *
  68.      * @return Image
  69.      */
  70.     public function setBrand(\QSL\ShopByBrand\Model\Brand $brand null)
  71.     {
  72.         $this->brand $brand;
  73.         return $this;
  74.     }
  75.     protected function isSvgAllowed(): bool
  76.     {
  77.         return true;
  78.     }
  79. }