src/Uniski/ResourceBundle/Entity/Product.php line 25

Open in your IDE?
  1. <?php
  2. namespace Uniski\ResourceBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Uniski\ResourceBundle\Entity\Destination;
  7. use Uniski\ResourceBundle\Entity\Extra;
  8. use Uniski\Utils\TeaserGenerator;
  9. /**
  10. * @ORM\Entity(repositoryClass="Uniski\ResourceBundle\Repository\ProductRepository")
  11. * @ORM\Table(name="product")
  12. * @ORM\InheritanceType("SINGLE_TABLE")
  13. * @ORM\DiscriminatorColumn(name="product_type", type="string")
  14. * @ORM\DiscriminatorMap({
  15. *   "product" = "Product",
  16. *   "ski" = "Ski",
  17. *   "activity" = "Activity",
  18. *   "pack" = "Pack"
  19. * })
  20. */
  21. class Product implements RateableInterface
  22. {
  23.   const PRICE_RATE_MODEL_SKI 'ski';
  24.   const PRICE_RATE_MODEL_GENERAL 'general';
  25.   const TAX_NONE 0;
  26.   const TAX_INCLUDED 1;
  27.   const TAX_NOT_INCLUDED 2;
  28.   /**
  29.    * @var integer
  30.    *
  31.    * @ORM\Id
  32.    * @ORM\Column(name="id", type="integer")
  33.    * @ORM\GeneratedValue(strategy="IDENTITY")
  34.    */
  35.   protected $id;
  36.   /**
  37.    * @var   \Uniski\ResourceBundle\Entity\Image
  38.    * @ORM\ManyToOne(targetEntity="Image", cascade={"persist"})
  39.    */
  40.   protected $mainImage;
  41.   /**
  42.    * @var   \Doctrine\Common\Collections\ArrayCollection
  43.    * @ORM\ManyToOne(targetEntity="Uniski\ConfigBundle\Entity\Category")
  44.    *
  45.    */
  46.   protected $zone;
  47.   /**
  48.    * @var   \Doctrine\Common\Collections\ArrayCollection
  49.    * @ORM\ManyToMany(targetEntity="PriceRate", cascade={"all"}, orphanRemoval=true)
  50.    * @ORM\JoinTable(name="product_rates",
  51.    *   joinColumns={@ORM\JoinColumn(name="product_id", referencedColumnName="id")},
  52.    *   inverseJoinColumns={@ORM\JoinColumn(name="rate_id", referencedColumnName="id")})
  53.    */
  54.   protected $rates;
  55.   /**
  56.    * @var  string
  57.    * @ORM\Column(name="name", type="string")
  58.    */
  59.   protected $name;
  60.   /**
  61.    * @var  string
  62.    * @ORM\Column(name="description", type="text", nullable=true)
  63.    */
  64.   protected $description;
  65.   /**
  66.    * @var  array
  67.    * @ORM\Column(name="seo", type="json")
  68.    */
  69.   protected $seo;
  70.   /**
  71.    * @var  array
  72.    * @ORM\Column(name="bookingConditions", type="json")
  73.    *
  74.    * For Ski is like this:
  75.    * Descuento 3r adulto, descuento 4rt adulto,
  76.    * suplemento individual, descuento niño,
  77.    * niño gratis de 0 a [edat]
  78.    * niño descuento hasta [edat]
  79.    */
  80.   protected $bookingConditions;
  81.   /**
  82.    * @var \Doctrine\Common\Collections\ArrayCollection
  83.    * @ORM\ManyToMany(targetEntity="Hotel", mappedBy="products")
  84.    */
  85.   protected $hotels;
  86.   /**
  87.    * @var   \Doctrine\Common\Collections\ArrayCollection
  88.    * @ORM\ManyToMany(targetEntity="\Uniski\ConfigBundle\Entity\Category", cascade={"persist"})
  89.    * @ORM\JoinTable(name="product_tags",
  90.    *   joinColumns={@ORM\JoinColumn(name="product_id", referencedColumnName="id")},
  91.    *   inverseJoinColumns={@ORM\JoinColumn(name="tag_id", referencedColumnName="id")})
  92.    */
  93.   protected $tags;
  94.   /**
  95.    * @Gedmo\Slug(fields={"name"})
  96.    * @ORM\Column(length=128, unique=true)
  97.    */
  98.   private $slug;
  99.   /**
  100.    * @var \Doctrine\Common\Collections\ArrayCollection
  101.    * @ORM\OneToMany(targetEntity="Extra", mappedBy="product", cascade={"persist"})
  102.    * @ORM\JoinTable(name="product_extra")
  103.    */
  104.   protected $extras;
  105.   /**
  106.    * @var   \Doctrine\Common\Collections\ArrayCollection
  107.    * @ORM\ManyToMany(targetEntity="Insurance", inversedBy="products")
  108.    */
  109.   protected $insurances;
  110.   /**
  111.    * @var float
  112.    *
  113.    * The absolute value of the product tax
  114.    * The tax is per person and night
  115.    *
  116.    * @ORM\Column(type="decimal", precision=6, scale=2, nullable=true)
  117.    */
  118.   protected $tax;
  119.   /**
  120.    * @var boolean
  121.    *
  122.    * Whether or not the tax should be included or added to the price.
  123.    * If not, the tax won't be included but an warning message will appear
  124.    * in booking pages and bonds
  125.    *
  126.    * @ORM\Column(type="boolean", nullable=true)
  127.    */
  128.   protected $addTax;
  129.   /**
  130.    * @var int
  131.    *
  132.    * The minimum number of days customer should request for this
  133.    * product (e.g. Ski minimum 2 days forfait, Caldea minimum 1 day)
  134.    *
  135.    * @ORM\Column(type="integer", nullable=true)
  136.    */
  137.   protected $minDays;
  138.   /**
  139.    * @var \DateTime $created
  140.    *
  141.    * @Gedmo\Timestampable(on="create")
  142.    * @ORM\Column(type="datetime")
  143.    */
  144.   private $created;
  145.   /**
  146.    * @var \DateTime $updated
  147.    *
  148.    * @Gedmo\Timestampable
  149.    * @ORM\Column(type="datetime")
  150.    */
  151.   private $updated;
  152.   /**
  153.    * @var   \Doctrine\Common\Collections\ArrayCollection
  154.    * @ORM\ManyToMany(targetEntity="Shop")
  155.    * @ORM\JoinTable(name="ski_shops",
  156.    *   joinColumns={@ORM\JoinColumn(name="ski_id", referencedColumnName="id")},
  157.    *   inverseJoinColumns={@ORM\JoinColumn(name="shop_id", referencedColumnName="id")})
  158.    */
  159.   protected $shops;
  160.   /**
  161.    * @var  string
  162.    * @ORM\Column(type="string", length=10)
  163.    */
  164.   protected $priceRateModel;
  165.   /**
  166.    * @var  string
  167.    * @ORM\Column(type="string")
  168.    */
  169.   protected $productName;
  170.   /**
  171.    * @var  string
  172.    * @ORM\Column(type="text", nullable=true)
  173.    */
  174.   protected $bondInstructions;
  175.   /**
  176.    * Destination
  177.    * @var Destination
  178.    * @ORM\ManyToOne(targetEntity="Destination", inversedBy="products")
  179.    */
  180.   protected $destination;
  181.   /**
  182.    * int
  183.    * @ORM\Column(type="smallint")
  184.    */
  185.   protected $showTax;
  186.   /**
  187.    * @ORM\Column(type="boolean")
  188.    */
  189.   protected $active;
  190.   /**
  191.    * Constructor
  192.    */
  193.   public function __construct()
  194.   {
  195.       $this->images = new \Doctrine\Common\Collections\ArrayCollection();
  196.       $this->rates = new \Doctrine\Common\Collections\ArrayCollection();
  197.       $this->extras = new \Doctrine\Common\Collections\ArrayCollection();
  198.       $this->hotels = new \Doctrine\Common\Collections\ArrayCollection();
  199.       $this->tags = new \Doctrine\Common\Collections\ArrayCollection();
  200.       $this->shops = new \Doctrine\Common\Collections\ArrayCollection();
  201.       $this->seo = [];
  202.       $this->bookingConditions = [
  203.         'allowActivityDiscount' => true
  204.       ];
  205.       $this->minDays 1;
  206.       $this->active true;
  207.   }
  208.   /**
  209.    * Get id
  210.    *
  211.    * @return integer
  212.    */
  213.   public function getId()
  214.   {
  215.       return $this->id;
  216.   }
  217.   /**
  218.    * Set name
  219.    *
  220.    * @param string $name
  221.    *
  222.    * @return Product
  223.    */
  224.   public function setName($name)
  225.   {
  226.       $this->name $name;
  227.       return $this;
  228.   }
  229.   /**
  230.    * Get name
  231.    *
  232.    * @return string
  233.    */
  234.   public function getName()
  235.   {
  236.       return $this->name;
  237.   }
  238.   /**
  239.    * Set description
  240.    *
  241.    * @param string $description
  242.    *
  243.    * @return Product
  244.    */
  245.   public function setDescription($description)
  246.   {
  247.       $this->description $description;
  248.       return $this;
  249.   }
  250.   /**
  251.    * Get description
  252.    *
  253.    * @return string
  254.    */
  255.   public function getDescription()
  256.   {
  257.       return $this->description;
  258.   }
  259.   /**
  260.    * Set seo
  261.    *
  262.    * @param array $seo
  263.    *
  264.    * @return Product
  265.    */
  266.   public function setSeo($seo)
  267.   {
  268.       $this->seo $seo;
  269.       return $this;
  270.   }
  271.   /**
  272.    * Get seo
  273.    *
  274.    * @return array
  275.    */
  276.   public function getSeo()
  277.   {
  278.     $seo $this->seo;
  279.     if (empty($seo['title'])) $seo['title'] = $this->getName();
  280.     
  281.     if ( empty($seo['description']) && 
  282.         !empty($this->getDescription())
  283.     ) {
  284.       $seo['description'] = TeaserGenerator::generate($this->getDescription());
  285.     }
  286.     if ( empty($seo['description']) && 
  287.          !empty($this->getDestination())
  288.     ) {
  289.       $seo['description'] = TeaserGenerator::generate($this->getDestination()->getDescription());
  290.     }
  291.     return $seo;
  292.   }
  293.   /**
  294.    * Set bookingConditions
  295.    *
  296.    * @param array $bookingConditions
  297.    *
  298.    * @return Product
  299.    */
  300.   public function setBookingConditions($bookingConditions)
  301.   {
  302.       $this->bookingConditions $bookingConditions;
  303.       return $this;
  304.   }
  305.   /**
  306.    * Get bookingConditions
  307.    *
  308.    * @return array
  309.    */
  310.   public function getBookingConditions()
  311.   {
  312.       return $this->bookingConditions;
  313.   }
  314.   /**
  315.    * Add image
  316.    *
  317.    * @param \Uniski\ResourceBundle\Entity\Image $image
  318.    *
  319.    * @return Product
  320.    */
  321.   public function addImage(\Uniski\ResourceBundle\Entity\Image $image)
  322.   {
  323.       $this->images[] = $image;
  324.       return $this;
  325.   }
  326.   /**
  327.    * Remove image
  328.    *
  329.    * @param \Uniski\ResourceBundle\Entity\Image $image
  330.    */
  331.   public function removeImage(\Uniski\ResourceBundle\Entity\Image $image)
  332.   {
  333.       $this->images->removeElement($image);
  334.   }
  335.   /**
  336.    * Get images
  337.    *
  338.    * @return \Doctrine\Common\Collections\Collection
  339.    */
  340.   public function getImages()
  341.   {
  342.       return $this->images;
  343.   }
  344.   /**
  345.    * Get zone
  346.    *
  347.    * @return \Uniski\ConfigBundle\Entity\Category
  348.    */
  349.   public function getZone()
  350.   {
  351.       return $this->destination->getZone();
  352.   }
  353.   /**
  354.    * Add rate
  355.    *
  356.    * @param \Uniski\ResourceBundle\Entity\PriceRate $rate
  357.    *
  358.    * @return Product
  359.    */
  360.   public function addRate(\Uniski\ResourceBundle\Entity\PriceRate $rate)
  361.   {
  362.       $this->rates[] = $rate;
  363.       return $this;
  364.   }
  365.   /**
  366.    * Remove rate
  367.    *
  368.    * @param \Uniski\ResourceBundle\Entity\PriceRate $rate
  369.    */
  370.   public function removeRate(\Uniski\ResourceBundle\Entity\PriceRate $rate)
  371.   {
  372.       $this->rates->removeElement($rate);
  373.   }
  374.   /**
  375.    * Remove rate
  376.    *
  377.    * @param \Uniski\ResourceBundle\Entity\PriceRate $rate
  378.    */
  379.   public function removeAllRates()
  380.   {
  381.     $this->rates->clear();
  382.   }
  383.   /**
  384.    * Get rates
  385.    *
  386.    * @return \Doctrine\Common\Collections\ArrayCollection
  387.    */
  388.   public function getRates()
  389.   {
  390.       return $this->rates;
  391.   }
  392.     /**
  393.      * Add tag
  394.      *
  395.      * @param \Uniski\ConfigBundle\Entity\Category $tag
  396.      *
  397.      * @return Product
  398.      */
  399.     public function addTag(\Uniski\ConfigBundle\Entity\Category $tag)
  400.     {
  401.         $this->tags[] = $tag;
  402.         return $this;
  403.     }
  404.     /**
  405.      * Remove tag
  406.      *
  407.      * @param \Uniski\ConfigBundle\Entity\Category $tag
  408.      */
  409.     public function removeTag(\Uniski\ConfigBundle\Entity\Category $tag)
  410.     {
  411.         $this->tags->removeElement($tag);
  412.     }
  413.     /**
  414.      * Get tags
  415.      *
  416.      * @return \Doctrine\Common\Collections\ArrayCollection
  417.      */
  418.     public function getTags()
  419.     {
  420.         return $this->tags;
  421.     }
  422.     /**
  423.      * Set slug
  424.      *
  425.      * @param string $slug
  426.      *
  427.      * @return Product
  428.      */
  429.     public function setSlug($slug)
  430.     {
  431.         $this->slug $slug;
  432.         return $this;
  433.     }
  434.     /**
  435.      * Get slug
  436.      *
  437.      * @return string
  438.      */
  439.     public function getSlug()
  440.     {
  441.         return $this->slug;
  442.     }
  443.     /**
  444.      * Set mainImage
  445.      *
  446.      * @param \Uniski\ResourceBundle\Entity\Image $mainImage
  447.      *
  448.      * @return Product
  449.      */
  450.     public function setMainImage(\Uniski\ResourceBundle\Entity\Image $mainImage null)
  451.     {
  452.         $this->mainImage $mainImage;
  453.         return $this;
  454.     }
  455.     /**
  456.      * Get mainImage
  457.      *
  458.      * @return \Uniski\ResourceBundle\Entity\Image
  459.      */
  460.     public function getMainImage()
  461.     {
  462.         return $this->mainImage;
  463.     }
  464.     /**
  465.      * Add hotel
  466.      *
  467.      * @return Product
  468.      */
  469.     public function addHotel(\Uniski\ResourceBundle\Entity\Hotel $hotel)
  470.     {
  471.         if($this->hotels->contains($hotel)) return;
  472.         $this->hotels[] = $hotel;
  473.         $hotel->addProduct($this);
  474.     }
  475.     /**
  476.      * Remove hotel
  477.      *
  478.      * @param \Uniski\ResourceBundle\Entity\Hotel $hotel
  479.      */
  480.     public function removeHotel(\Uniski\ResourceBundle\Entity\Hotel $hotel)
  481.     {
  482.         if(!$this->hotels->contains($hotel)) return;
  483.         $this->hotels->removeElement($hotel);
  484.         $hotel->removeProduct($this);
  485.     }
  486.     /**
  487.      * Get hotels
  488.      *
  489.      * @return \Doctrine\Common\Collections\ArrayCollection
  490.      */
  491.     public function getHotels()
  492.     {
  493.         return $this->hotels;
  494.     }
  495.     /**
  496.      * Add extra
  497.      *
  498.      * @param \Uniski\ResourceBundle\Entity\Extra $extra
  499.      *
  500.      * @return Product
  501.      */
  502.     public function addExtra(Extra $extra)
  503.     {
  504.         if ($this->extras->contains($extra)) return;
  505.         $this->extras[] = $extra;
  506.         $extra->setProduct($this);
  507.         return $this;
  508.     }
  509.     /**
  510.      * Remove extra
  511.      *
  512.      * @param \Uniski\ResourceBundle\Entity\Extra $extra
  513.      */
  514.     public function removeExtra(Extra $extra)
  515.     {
  516.         if (!$this->extras->contains($extra)) return $this;
  517.         $this->extras->removeElement($extra);
  518.         $extra->setProduct(null);
  519.     }
  520.     /**
  521.      * Get extras
  522.      *
  523.      * @return \Doctrine\Common\Collections\ArrayCollection
  524.      */
  525.     public function getExtras()
  526.     {
  527.         return $this->extras;
  528.     }
  529.     /**
  530.      * Add insurance
  531.      *
  532.      * @param \Uniski\ResourceBundle\Entity\Insurance $insurance
  533.      *
  534.      * @return Product
  535.      */
  536.     public function addInsurances(\Uniski\ResourceBundle\Entity\Insurance $insurance)
  537.     {
  538.         $this->insurances[] = $insurance;
  539.         return $this;
  540.     }
  541.     /**
  542.      * Remove insurance
  543.      *
  544.      * @param \Uniski\ResourceBundle\Entity\Insurance $insurance
  545.      */
  546.     public function removeInsurance(\Uniski\ResourceBundle\Entity\Insurance $insurance)
  547.     {
  548.         $this->insurances->removeElement($insurance);
  549.     }
  550.     /**
  551.      * Get insurance
  552.      *
  553.      * @return \Doctrine\Common\Collections\Collection
  554.      */
  555.     public function getInsurances()
  556.     {
  557.         return $this->insurances;
  558.     }
  559.     /**
  560.      * Add insurance
  561.      *
  562.      * @param \Uniski\ResourceBundle\Entity\Insurance $insurance
  563.      *
  564.      * @return Product
  565.      */
  566.     public function addInsurance(\Uniski\ResourceBundle\Entity\Insurance $insurance)
  567.     {
  568.         $this->insurances[] = $insurance;
  569.         return $this;
  570.     }
  571.     public function setHotels($hotels)
  572.     {
  573.       $this->hotels $hotels;
  574.     }
  575.     /**
  576.      * Gets the value of tax.
  577.      *
  578.      * @return float
  579.      */
  580.     public function getTax()
  581.     {
  582.         return $this->tax;
  583.     }
  584.     /**
  585.      * Sets the value of tax.
  586.      *
  587.      * @param float $tax the tax
  588.      *
  589.      * @return self
  590.      */
  591.     public function setTax($tax)
  592.     {
  593.         $this->tax $tax;
  594.         return $this;
  595.     }
  596.     /**
  597.      * Gets the Whether or not the tax should be included or added to the price
  598. If not, the tax won't be included but an warning message will appear
  599. in booking pages and bonds.
  600.      *
  601.      * @return boolean
  602.      */
  603.     public function getAddTax()
  604.     {
  605.         return $this->addTax;
  606.     }
  607.     /**
  608.      * Sets the Whether or not the tax should be included or added to the price
  609. If not, the tax won't be included but an warning message will appear
  610. in booking pages and bonds.
  611.      *
  612.      * @param boolean $addTax the add tax
  613.      *
  614.      * @return self
  615.      */
  616.     public function setAddTax($addTax)
  617.     {
  618.         $this->addTax $addTax;
  619.         return $this;
  620.     }
  621.     /**
  622.      * Gets the The minimum number of days customer should request for this
  623. product (e.g. Ski minimum 2 days forfait, Caldea minimum 1 day).
  624.      *
  625.      * @return int
  626.      */
  627.     public function getMinDays()
  628.     {
  629.         return $this->minDays;
  630.     }
  631.     /**
  632.      * Sets the The minimum number of days customer should request for this
  633. product (e.g. Ski minimum 2 days forfait, Caldea minimum 1 day).
  634.      *
  635.      * @param int $minDays the min days
  636.      *
  637.      * @return self
  638.      */
  639.     public function setMinDays($minDays)
  640.     {
  641.         $this->minDays $minDays;
  642.         return $this;
  643.     }
  644.     /**
  645.      * Gets the value of created.
  646.      *
  647.      * @return \DateTime $created
  648.      */
  649.     public function getCreated()
  650.     {
  651.         return $this->created;
  652.     }
  653.     /**
  654.      * Sets the value of created.
  655.      *
  656.      * @param \DateTime $created $created the created
  657.      *
  658.      * @return self
  659.      */
  660.     public function setCreated($created)
  661.     {
  662.         $this->created $created;
  663.         return $this;
  664.     }
  665.     /**
  666.      * Gets the value of updated.
  667.      *
  668.      * @return \DateTime $updated
  669.      */
  670.     public function getUpdated()
  671.     {
  672.         return $this->updated;
  673.     }
  674.     /**
  675.      * Sets the value of updated.
  676.      *
  677.      * @param \DateTime $updated $updated the updated
  678.      *
  679.      * @return self
  680.      */
  681.     public function setUpdated($updated)
  682.     {
  683.         $this->updated $updated;
  684.         return $this;
  685.     }
  686.     /**
  687.      * Add shop
  688.      *
  689.      * @param \Uniski\ResourceBundle\Entity\Shop $shop
  690.      *
  691.      * @return Product
  692.      */
  693.      public function addShop(\Uniski\ResourceBundle\Entity\Shop $shop)
  694.      {
  695.         $this->shops[] = $shop;
  696.         return $this;
  697.      }
  698.      /**
  699.      * Remove shop
  700.      *
  701.      * @param \Uniski\ResourceBundle\Entity\Shop $shop
  702.      */
  703.      public function removeShop(\Uniski\ResourceBundle\Entity\Shop $shop)
  704.      {
  705.         $this->shops->removeElement($shop);
  706.      }
  707.      /**
  708.      * Get shops
  709.      *
  710.      * @return \Doctrine\Common\Collections\Collection
  711.      */
  712.      public function getShops()
  713.      {
  714.         return $this->shops;
  715.      }
  716.      public function setShops(ArrayCollection $shops)
  717.      {
  718.        $this->shops $shops;
  719.        return $this;
  720.      }
  721.      public function createRate()
  722.      {
  723.        switch ($this->priceRateModel) {
  724.          case self::PRICE_RATE_MODEL_SKI:
  725.            return new SkiRate();
  726.          default:
  727.            return new ActivityRate();
  728.        }
  729.      }
  730.     /**
  731.      * Gets the value of priceRateModel.
  732.      *
  733.      * @return  string
  734.      */
  735.     public function getPriceRateModel()
  736.     {
  737.         return $this->priceRateModel;
  738.     }
  739.     /**
  740.      * Sets the value of priceRateModel.
  741.      *
  742.      * @param  string $priceRateModel the price rate model
  743.      *
  744.      * @return self
  745.      */
  746.     public function setPriceRateModel($priceRateModel)
  747.     {
  748.         $this->priceRateModel $priceRateModel;
  749.         return $this;
  750.     }
  751.     /**
  752.      * Gets the value of productName.
  753.      *
  754.      * @return  string
  755.      */
  756.     public function getProductName()
  757.     {
  758.         return $this->productName;
  759.     }
  760.     /**
  761.      * Sets the value of productName.
  762.      *
  763.      * @param  string $productName the product name
  764.      *
  765.      * @return self
  766.      */
  767.     public function setProductName($productName)
  768.     {
  769.         $this->productName $productName;
  770.         return $this;
  771.     }
  772.     /**
  773.      * Gets the value of bondInstructions.
  774.      *
  775.      * @return  string
  776.      */
  777.     public function getBondInstructions()
  778.     {
  779.         return $this->bondInstructions;
  780.     }
  781.     /**
  782.      * Sets the value of bondInstructions.
  783.      *
  784.      * @param  string $bondInstructions the bond instructions
  785.      *
  786.      * @return self
  787.      */
  788.     public function setBondInstructions($bondInstructions)
  789.     {
  790.         $this->bondInstructions $bondInstructions;
  791.         return $this;
  792.     }
  793.     /**
  794.      * @return Destination
  795.      */
  796.     public function getDestination()
  797.     {
  798.         return $this->destination;
  799.     }
  800.     /**
  801.      * @param Destination $destination
  802.      *
  803.      * @return self
  804.      */
  805.     public function setDestination(Destination $destination)
  806.     {
  807.         $this->destination $destination;
  808.         return $this;
  809.     }
  810.     /**
  811.      * @return mixed
  812.      */
  813.     public function getShowTax()
  814.     {
  815.         return $this->showTax;
  816.     }
  817.     /**
  818.      * @param mixed $showTax
  819.      *
  820.      * @return self
  821.      */
  822.     public function setShowTax($showTax)
  823.     {
  824.         $this->showTax $showTax;
  825.         return $this;
  826.     }
  827.     /**
  828.      * @return mixed
  829.      */
  830.     public function getActive()
  831.     {
  832.         return $this->active;
  833.     }
  834.     /**
  835.      * @param mixed $active
  836.      *
  837.      * @return self
  838.      */
  839.     public function setActive($active)
  840.     {
  841.         $this->active $active;
  842.         return $this;
  843.     }
  844. }