vendor/webbamboo/spinners-common/src/Entity/Counties.php line 14

  1. <?php
  2. namespace Webbamboo\SpinnersCommon\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\Criteria;
  5. /**
  6.  * Counties
  7.  *
  8.  * @ORM\Table("Counties")
  9.  * @ORM\Entity
  10.  */
  11. class Counties
  12. {
  13.     /**
  14.      * @var integer
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var string
  23.      *
  24.      * @ORM\Column(name="name", type="string", length=100)
  25.      */
  26.     private $name;
  27.     /**
  28.      * @var integer
  29.      *
  30.      * @ORM\Column(name="link", type="integer")
  31.      */
  32.     private $link;
  33.     /**
  34.      * @ORM\OneToMany(targetEntity="City", mappedBy="county")
  35.      */
  36.     private $cities;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(name="permalink", type="string", length=100)
  41.      */
  42.     private $permalink;
  43.     /**
  44.     * @ORM\ManyToOne(targetEntity="Metatitlecounty", inversedBy="counties")
  45.     * @ORM\JoinColumn(referencedColumnName="id")
  46.     */
  47.     private $metatitle;
  48.     
  49.     /**
  50.      * @var string
  51.      *
  52.      * @ORM\Column(name="manualmetatitle", type="string", length=255, nullable=true)
  53.      */
  54.     private $manualMetatitle;
  55.     /**
  56.     * @ORM\ManyToOne(targetEntity="Metadescriptioncounty", inversedBy="counties")
  57.     * @ORM\JoinColumn(referencedColumnName="id")
  58.     */
  59.     private $metadescription;
  60.     /**
  61.      * @var string
  62.      *
  63.      * @ORM\Column(name="manualmetadescription", type="string", length=255, nullable=true)
  64.      */
  65.     private $manualMetadescription;
  66.     
  67.     /**
  68.     * @ORM\ManyToOne(targetEntity="H1county", inversedBy="counties")
  69.     * @ORM\JoinColumn(referencedColumnName="id")
  70.     */
  71.     private $h1;
  72.     
  73.     /**
  74.      * @var text
  75.      *
  76.      * @ORM\Column(name="manualh1", type="text", nullable=true)
  77.      */
  78.     private $manualH1;
  79.     /**
  80.     * @ORM\ManyToOne(targetEntity="Contentpartonecounty", inversedBy="counties")
  81.     * @ORM\JoinColumn(referencedColumnName="id")
  82.     */
  83.     private $contentone;
  84.     
  85.     /**
  86.     * @var text
  87.     *
  88.     * @ORM\Column(name="manualcontentone", type="text", nullable=true)
  89.     */
  90.     private $manualContentone;
  91.     /**
  92.     * @ORM\ManyToOne(targetEntity="Contentparttwocounty", inversedBy="counties")
  93.     * @ORM\JoinColumn(referencedColumnName="id")
  94.     */
  95.     private $contenttwo;
  96.     
  97.     /**
  98.     * @var text
  99.     *
  100.     * @ORM\Column(name="manualcontenttwo", type="text", nullable=true)
  101.     */
  102.     private $manualContenttwo;
  103.     /**
  104.      * @var string
  105.      *
  106.      * @ORM\Column(name="latitude", type="decimal", scale=5)
  107.      */
  108.     private $latitude;
  109.     /**
  110.      * @var string
  111.      *
  112.      * @ORM\Column(name="longitude", type="decimal", scale=5)
  113.      */
  114.     private $longitude;
  115.     /**
  116.     * @ORM\ManyToOne(targetEntity="Countythumbnail", inversedBy="counties")
  117.     * @ORM\JoinColumn(referencedColumnName="id")
  118.     */
  119.     private $thumbnail;
  120.     
  121.     /**
  122.      * @var string
  123.      *
  124.      * @ORM\Column(name="manualthumbnail", type="string", length=255, nullable=true)
  125.      */
  126.     private $manualThumbnail;
  127.     
  128.     /**
  129.      * @var string
  130.      *
  131.      * @ORM\Column(name="manualthumbnailname", type="string", length=255, nullable=true)
  132.      */
  133.     private $manualThumbnailname;
  134.     
  135.     /**
  136.      * @var string
  137.      *
  138.      * @ORM\Column(name="manualthumbnailalt", type="string", length=255, nullable=true)
  139.      */
  140.     private $manualThumbnailalt;
  141.     
  142.     /**
  143.     * @var string
  144.     *
  145.     * @ORM\Column(name="manual", type="boolean", nullable=true)
  146.     */
  147.     private $manual;
  148.     /**
  149.      * Get id
  150.      *
  151.      * @return integer
  152.      */
  153.     public function getId()
  154.     {
  155.         return $this->id;
  156.     }
  157.     /**
  158.      * Set name
  159.      *
  160.      * @param string $name
  161.      * @return Counties
  162.      */
  163.     public function setName($name)
  164.     {
  165.         $this->name $name;
  166.         return $this;
  167.     }
  168.     /**
  169.      * Get name
  170.      *
  171.      * @return string
  172.      */
  173.     public function getName()
  174.     {
  175.         return $this->name;
  176.     }
  177.     /**
  178.      * Set link
  179.      *
  180.      * @param integer $link
  181.      * @return Counties
  182.      */
  183.     public function setLink($link)
  184.     {
  185.         $this->link $link;
  186.         return $this;
  187.     }
  188.     /**
  189.      * Get link
  190.      *
  191.      * @return integer
  192.      */
  193.     public function getLink()
  194.     {
  195.         return $this->link;
  196.     }
  197.     /**
  198.      * Constructor
  199.      */
  200.     public function __construct()
  201.     {
  202.         $this->cities = new \Doctrine\Common\Collections\ArrayCollection();
  203.     }
  204.     /**
  205.      * Add cities
  206.      *
  207.      * @param \Webbamboo\SpinnersCommon\Entity\City $cities
  208.      * @return Counties
  209.      */
  210.     public function addCity(\Webbamboo\SpinnersCommon\Entity\City $cities)
  211.     {
  212.         $this->cities[] = $cities;
  213.         return $this;
  214.     }
  215.     /**
  216.      * Remove cities
  217.      *
  218.      * @param \Webbamboo\SpinnersCommon\Entity\City $cities
  219.      */
  220.     public function removeCity(\Webbamboo\SpinnersCommon\Entity\City $cities)
  221.     {
  222.         $this->cities->removeElement($cities);
  223.     }
  224.     /**
  225.      * Get cities
  226.      *
  227.      * @return \Doctrine\Common\Collections\Collection
  228.      */
  229.     public function getCities()
  230.     {
  231.         return $this->cities;
  232.     }
  233.     public function getCitiesOrderedByName()
  234.     {
  235.         $criteria Criteria::create()
  236.                     ->orderBy(array("name" => Criteria::ASC));
  237.         return $this->cities->matching($criteria);
  238.     }
  239.     /**
  240.      * Set permalink
  241.      *
  242.      * @param string $permalink
  243.      * @return Counties
  244.      */
  245.     public function setPermalink($permalink)
  246.     {
  247.         $this->permalink $permalink;
  248.         return $this;
  249.     }
  250.     /**
  251.      * Get permalink
  252.      *
  253.      * @return string
  254.      */
  255.     public function getPermalink()
  256.     {
  257.         return $this->permalink;
  258.     }
  259.     public function getPermalinkP()
  260.     {
  261.         $url=array(
  262.         "%C3%85","%C3%A5",
  263.         "%C3%84","%C3%A4",
  264.         "%C3%96","%C3%B6",
  265.         );
  266.         $char=array(
  267.          "Ã…","Ã¥",
  268.          "Ä","ä",
  269.          "Ö","ö",
  270.         );
  271.         return str_replace($url$char$this->permalink);
  272.     }
  273.     public function getMapsString()
  274.     {
  275.         return urlencode($this->name.' län, Sweden');
  276.     }
  277.     /**
  278.      * Set metatitle
  279.      *
  280.      * @param \Webbamboo\SpinnersCommon\Entity\Metatitlecounty $metatitle
  281.      * @return Counties
  282.      */
  283.     public function setMetatitle(\Webbamboo\SpinnersCommon\Entity\Metatitlecounty $metatitle null)
  284.     {
  285.         $this->metatitle $metatitle;
  286.         return $this;
  287.     }
  288.     /**
  289.      * Get metatitle
  290.      *
  291.      * @return \Webbamboo\SpinnersCommon\Entity\Metatitlecounty
  292.      */
  293.     public function getMetatitle()
  294.     {
  295.         return $this->metatitle;
  296.     }
  297.     /**
  298.      * Set metadescription
  299.      *
  300.      * @param \Webbamboo\SpinnersCommon\Entity\Metadescriptioncounty $metadescription
  301.      * @return Counties
  302.      */
  303.     public function setMetadescription(\Webbamboo\SpinnersCommon\Entity\Metadescriptioncounty $metadescription null)
  304.     {
  305.         $this->metadescription $metadescription;
  306.         return $this;
  307.     }
  308.     /**
  309.      * Get metadescription
  310.      *
  311.      * @return \Webbamboo\SpinnersCommon\Entity\Metadescriptioncounty
  312.      */
  313.     public function getMetadescription()
  314.     {
  315.         return $this->metadescription;
  316.     }
  317.     /**
  318.      * Set contentone
  319.      *
  320.      * @param \Webbamboo\SpinnersCommon\Entity\Contentpartonecounty $contentone
  321.      * @return Counties
  322.      */
  323.     public function setContentone(\Webbamboo\SpinnersCommon\Entity\Contentpartonecounty $contentone null)
  324.     {
  325.         $this->contentone $contentone;
  326.         return $this;
  327.     }
  328.     /**
  329.      * Get contentone
  330.      *
  331.      * @return \Webbamboo\SpinnersCommon\Entity\Contentpartonecounty
  332.      */
  333.     public function getContentone()
  334.     {
  335.         return $this->contentone;
  336.     }
  337.     /**
  338.      * Set contenttwo
  339.      *
  340.      * @param \Webbamboo\SpinnersCommon\Entity\Contentparttwocounty $contenttwo
  341.      * @return Counties
  342.      */
  343.     public function setContenttwo(\Webbamboo\SpinnersCommon\Entity\Contentparttwocounty $contenttwo null)
  344.     {
  345.         $this->contenttwo $contenttwo;
  346.         return $this;
  347.     }
  348.     /**
  349.      * Get contenttwo
  350.      *
  351.      * @return \Webbamboo\SpinnersCommon\Entity\Contentparttwocounty
  352.      */
  353.     public function getContenttwo()
  354.     {
  355.         return $this->contenttwo;
  356.     }
  357.     /**
  358.      * Set h1
  359.      *
  360.      * @param \Webbamboo\SpinnersCommon\Entity\H1county $h1
  361.      * @return Counties
  362.      */
  363.     public function setH1(\Webbamboo\SpinnersCommon\Entity\H1county $h1 null)
  364.     {
  365.         $this->h1 $h1;
  366.         return $this;
  367.     }
  368.     /**
  369.      * Get h1
  370.      *
  371.      * @return \Webbamboo\SpinnersCommon\Entity\H1county
  372.      */
  373.     public function getH1()
  374.     {
  375.         return $this->h1;
  376.     }
  377.     /**
  378.      * Set latitude
  379.      *
  380.      * @param string $latitude
  381.      * @return Counties
  382.      */
  383.     public function setLatitude($latitude)
  384.     {
  385.         $this->latitude $latitude;
  386.         return $this;
  387.     }
  388.     /**
  389.      * Get latitude
  390.      *
  391.      * @return string
  392.      */
  393.     public function getLatitude()
  394.     {
  395.         return $this->latitude;
  396.     }
  397.     /**
  398.      * Set longitude
  399.      *
  400.      * @param string $longitude
  401.      * @return Counties
  402.      */
  403.     public function setLongitude($longitude)
  404.     {
  405.         $this->longitude $longitude;
  406.         return $this;
  407.     }
  408.     /**
  409.      * Get longitude
  410.      *
  411.      * @return string
  412.      */
  413.     public function getLongitude()
  414.     {
  415.         return $this->longitude;
  416.     }
  417.     /**
  418.      * Set thumbnail
  419.      *
  420.      * @param \Webbamboo\SpinnersCommon\Entity\Countythumbnail $thumbnail
  421.      * @return Counties
  422.      */
  423.     public function setThumbnail(\Webbamboo\SpinnersCommon\Entity\Countythumbnail $thumbnail null)
  424.     {
  425.         $this->thumbnail $thumbnail;
  426.         return $this;
  427.     }
  428.     /**
  429.      * Get thumbnail
  430.      *
  431.      * @return \Webbamboo\SpinnersCommon\Entity\Countythumbnail
  432.      */
  433.     public function getThumbnail()
  434.     {
  435.         return $this->thumbnail;
  436.     }
  437.     /**
  438.      * Set manualMetatitle
  439.      *
  440.      * @param string $manualMetatitle
  441.      *
  442.      * @return Counties
  443.      */
  444.     public function setManualMetatitle($manualMetatitle)
  445.     {
  446.         $this->manualMetatitle $manualMetatitle;
  447.         return $this;
  448.     }
  449.     /**
  450.      * Get manualMetatitle
  451.      *
  452.      * @return string
  453.      */
  454.     public function getManualMetatitle()
  455.     {
  456.         return $this->manualMetatitle;
  457.     }
  458.     /**
  459.      * Set manualMetadescription
  460.      *
  461.      * @param string $manualMetadescription
  462.      *
  463.      * @return Counties
  464.      */
  465.     public function setManualMetadescription($manualMetadescription)
  466.     {
  467.         $this->manualMetadescription $manualMetadescription;
  468.         return $this;
  469.     }
  470.     /**
  471.      * Get manualMetadescription
  472.      *
  473.      * @return string
  474.      */
  475.     public function getManualMetadescription()
  476.     {
  477.         return $this->manualMetadescription;
  478.     }
  479.     /**
  480.      * Set manualH1
  481.      *
  482.      * @param string $manualH1
  483.      *
  484.      * @return Counties
  485.      */
  486.     public function setManualH1($manualH1)
  487.     {
  488.         $this->manualH1 $manualH1;
  489.         return $this;
  490.     }
  491.     /**
  492.      * Get manualH1
  493.      *
  494.      * @return string
  495.      */
  496.     public function getManualH1()
  497.     {
  498.         return $this->manualH1;
  499.     }
  500.     /**
  501.      * Set manualContentone
  502.      *
  503.      * @param string $manualContentone
  504.      *
  505.      * @return Counties
  506.      */
  507.     public function setManualContentone($manualContentone)
  508.     {
  509.         $this->manualContentone $manualContentone;
  510.         return $this;
  511.     }
  512.     /**
  513.      * Get manualContentone
  514.      *
  515.      * @return string
  516.      */
  517.     public function getManualContentone()
  518.     {
  519.         return $this->manualContentone;
  520.     }
  521.     /**
  522.      * Set manualContenttwo
  523.      *
  524.      * @param string $manualContenttwo
  525.      *
  526.      * @return Counties
  527.      */
  528.     public function setManualContenttwo($manualContenttwo)
  529.     {
  530.         $this->manualContenttwo $manualContenttwo;
  531.         return $this;
  532.     }
  533.     /**
  534.      * Get manualContenttwo
  535.      *
  536.      * @return string
  537.      */
  538.     public function getManualContenttwo()
  539.     {
  540.         return $this->manualContenttwo;
  541.     }
  542.     /**
  543.      * Set manualThumbnail
  544.      *
  545.      * @param string $manualThumbnail
  546.      *
  547.      * @return Counties
  548.      */
  549.     public function setManualThumbnail($manualThumbnail)
  550.     {
  551.         $this->manualThumbnail $manualThumbnail;
  552.         return $this;
  553.     }
  554.     /**
  555.      * Get manualThumbnail
  556.      *
  557.      * @return string
  558.      */
  559.     public function getManualThumbnail()
  560.     {
  561.         return $this->manualThumbnail;
  562.     }
  563.     /**
  564.      * Set manualThumbnailname
  565.      *
  566.      * @param string $manualThumbnailname
  567.      *
  568.      * @return Counties
  569.      */
  570.     public function setManualThumbnailname($manualThumbnailname)
  571.     {
  572.         $this->manualThumbnailname $manualThumbnailname;
  573.         return $this;
  574.     }
  575.     /**
  576.      * Get manualThumbnailname
  577.      *
  578.      * @return string
  579.      */
  580.     public function getManualThumbnailname()
  581.     {
  582.         return $this->manualThumbnailname;
  583.     }
  584.     /**
  585.      * Set manualThumbnailalt
  586.      *
  587.      * @param string $manualThumbnailalt
  588.      *
  589.      * @return Counties
  590.      */
  591.     public function setManualThumbnailalt($manualThumbnailalt)
  592.     {
  593.         $this->manualThumbnailalt $manualThumbnailalt;
  594.         return $this;
  595.     }
  596.     /**
  597.      * Get manualThumbnailalt
  598.      *
  599.      * @return string
  600.      */
  601.     public function getManualThumbnailalt()
  602.     {
  603.         return $this->manualThumbnailalt;
  604.     }
  605.     /**
  606.      * Set manual
  607.      *
  608.      * @param boolean $manual
  609.      *
  610.      * @return Counties
  611.      */
  612.     public function setManual($manual)
  613.     {
  614.         $this->manual $manual;
  615.         return $this;
  616.     }
  617.     /**
  618.      * Get manual
  619.      *
  620.      * @return boolean
  621.      */
  622.     public function getManual()
  623.     {
  624.         return $this->manual;
  625.     }
  626. }