File Manager Lite
Dir:
/home/u540325668/domains/dumbafarm.in/public_html/src/PrestaShopBundle/Entity
Upload
[..]
AdminFilter.php (9.41 KB)
Edit
Rename
Del
ApiAccess.php (4.04 KB)
Edit
Rename
Del
Attribute.php (5.08 KB)
Edit
Rename
Del
AttributeGroup.php (5.65 KB)
Edit
Rename
Del
AttributeGroupLang.php (3.79 KB)
Edit
Rename
Del
AuthorizedApplication.php (2.64 KB)
Edit
Rename
Del
FeatureFlag.php (5.67 KB)
Edit
Rename
Del
Lang.php (6.93 KB)
Edit
Rename
Del
ModuleHistory.php (3.8 KB)
Edit
Rename
Del
ProductDownload.php (5.89 KB)
Edit
Rename
Del
ProductIdentity.php (2.35 KB)
Edit
Rename
Del
Repository/
Rename
Del
Shop.php (5.58 KB)
Edit
Rename
Del
ShopGroup.php (5.41 KB)
Edit
Rename
Del
ShopUrl.php (4.46 KB)
Edit
Rename
Del
StockMvt.php (9.43 KB)
Edit
Rename
Del
Tab.php (4.47 KB)
Edit
Rename
Del
TabLang.php (2.63 KB)
Edit
Rename
Del
Translation.php (4.04 KB)
Edit
Rename
Del
Edit: Attribute.php
<?php /** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors <contact@prestashop.com> * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShopBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * Attribute. * * @ORM\Table( * indexes={@ORM\Index(name="attribute_group", columns={"id_attribute_group"})} * ) * @ORM\Entity(repositoryClass="PrestaShopBundle\Entity\Repository\AttributeRepository") */ class Attribute { /** * @var int * * @ORM\Id * @ORM\Column(name="id_attribute", type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @ORM\ManyToOne(targetEntity="PrestaShopBundle\Entity\AttributeGroup", inversedBy="attributes") * @ORM\JoinColumn(name="id_attribute_group", referencedColumnName="id_attribute_group", nullable=false) */ private $attributeGroup; /** * @var string * * @ORM\Column(name="color", type="string", length=32) */ private $color; /** * @var int * * @ORM\Column(name="position", type="integer") */ private $position; /** * @var Collection * * @ORM\ManyToMany(targetEntity="PrestaShopBundle\Entity\Shop", cascade={"persist"}) * @ORM\JoinTable( * joinColumns={@ORM\JoinColumn(name="id_attribute", referencedColumnName="id_attribute")}, * inverseJoinColumns={@ORM\JoinColumn(name="id_shop", referencedColumnName="id_shop", onDelete="CASCADE")} * ) */ private $shops; /** * @var Collection * * @ORM\OneToMany(targetEntity="PrestaShopBundle\Entity\AttributeLang", mappedBy="attribute") */ private $attributeLangs; /** * Constructor. */ public function __construct() { $this->shops = new ArrayCollection(); $this->attributeLangs = new ArrayCollection(); } /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set color. * * @param string $color * * @return Attribute */ public function setColor($color) { $this->color = $color; return $this; } /** * Get color. * * @return string */ public function getColor() { return $this->color; } /** * Set position. * * @param int $position * * @return Attribute */ public function setPosition($position) { $this->position = $position; return $this; } /** * Get position. * * @return int */ public function getPosition() { return $this->position; } /** * Set attributeGroup. * * @param AttributeGroup $attributeGroup * * @return Attribute */ public function setAttributeGroup(AttributeGroup $attributeGroup) { $this->attributeGroup = $attributeGroup; return $this; } /** * Get attributeGroup. * * @return AttributeGroup */ public function getAttributeGroup() { return $this->attributeGroup; } /** * Add shop. * * @param Shop $shop * * @return Attribute */ public function addShop(Shop $shop) { $this->shops[] = $shop; return $this; } /** * Remove shop. * * @param Shop $shop */ public function removeShop(Shop $shop) { $this->shops->removeElement($shop); } /** * Get shops. * * @return Collection<Shop> */ public function getShops() { return $this->shops; } public function addAttributeLang(AttributeLang $attributeLang) { $this->attributeLangs[] = $attributeLang; $attributeLang->setAttribute($this); return $this; } public function removeAttributeLang(AttributeLang $attributeLang) { $this->attributeLangs->removeElement($attributeLang); } /** * @return Collection<AttributeLang> */ public function getAttributeLangs() { return $this->attributeLangs; } }
Simpan