]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Entity/User.php
Rename section to page.title
[airbundle] / Entity / User.php
index fd35891ea950ab872890a53094f9b8b269d2af23..151f1a10f86662f4c2d9d1724c40bf9a4ad83321 100644 (file)
@@ -5,7 +5,8 @@ namespace Rapsys\AirBundle\Entity;
 
 use Rapsys\AirBundle\Entity\Application;
 use Rapsys\AirBundle\Entity\Group;
 
 use Rapsys\AirBundle\Entity\Application;
 use Rapsys\AirBundle\Entity\Group;
-use Rapsys\AirBundle\Entity\Vote;
+use Rapsys\AirBundle\Entity\Link;
+use Rapsys\AirBundle\Entity\Snippet;
 use Rapsys\UserBundle\Entity\User as BaseUser;
 
 class User extends BaseUser {
 use Rapsys\UserBundle\Entity\User as BaseUser;
 
 class User extends BaseUser {
@@ -15,19 +16,19 @@ class User extends BaseUser {
        protected $phone;
 
        /**
        protected $phone;
 
        /**
-        * @var string
+        * @var \Doctrine\Common\Collections\Collection
         */
         */
-       protected $donation;
+       private $applications;
 
        /**
 
        /**
-        * @var string
+        * @var \Doctrine\Common\Collections\Collection
         */
         */
-       protected $site;
+       private $locations;
 
        /**
         * @var \Doctrine\Common\Collections\Collection
         */
 
        /**
         * @var \Doctrine\Common\Collections\Collection
         */
-       private $applications;
+       private $snippets;
 
        /**
         * @var \Doctrine\Common\Collections\Collection
 
        /**
         * @var \Doctrine\Common\Collections\Collection
@@ -39,11 +40,6 @@ class User extends BaseUser {
         */
        private $subscriptions;
 
         */
        private $subscriptions;
 
-       /**
-        * @var \Doctrine\Common\Collections\Collection
-        */
-       private $snippets;
-
        /**
         * Constructor
         */
        /**
         * Constructor
         */
@@ -53,9 +49,10 @@ class User extends BaseUser {
 
                //Set collections
                $this->applications = new \Doctrine\Common\Collections\ArrayCollection();
 
                //Set collections
                $this->applications = new \Doctrine\Common\Collections\ArrayCollection();
+               $this->locations = new \Doctrine\Common\Collections\ArrayCollection();
+               $this->snippets = new \Doctrine\Common\Collections\ArrayCollection();
                $this->subscribers = new \Doctrine\Common\Collections\ArrayCollection();
                $this->subscriptions = new \Doctrine\Common\Collections\ArrayCollection();
                $this->subscribers = new \Doctrine\Common\Collections\ArrayCollection();
                $this->subscriptions = new \Doctrine\Common\Collections\ArrayCollection();
-               $this->snippets = new \Doctrine\Common\Collections\ArrayCollection();
        }
 
        /**
        }
 
        /**
@@ -155,6 +152,68 @@ class User extends BaseUser {
                return $this->applications;
        }
 
                return $this->applications;
        }
 
+       /**
+        * Add snippet
+        *
+        * @param \Rapsys\AirBundle\Entity\Snippet $snippet
+        *
+        * @return User
+        */
+       public function addSnippet(Snippet $snippet) {
+               $this->snippets[] = $snippet;
+
+               return $this;
+       }
+
+       /**
+        * Remove snippet
+        *
+        * @param \Rapsys\AirBundle\Entity\Snippet $snippet
+        */
+       public function removeSnippet(Snippet $snippet) {
+               $this->snippets->removeElement($snippet);
+       }
+
+       /**
+        * Get snippets
+        *
+        * @return \Doctrine\Common\Collections\Collection
+        */
+       public function getSnippets() {
+               return $this->snippets;
+       }
+
+       /**
+        * Add location
+        *
+        * @param \Rapsys\AirBundle\Entity\Location $location
+        *
+        * @return User
+        */
+       public function addLocation(Location $location) {
+               $this->locations[] = $location;
+
+               return $this;
+       }
+
+       /**
+        * Remove location
+        *
+        * @param \Rapsys\AirBundle\Entity\Location $location
+        */
+       public function removeLocation(Location $location) {
+               $this->locations->removeElement($location);
+       }
+
+       /**
+        * Get locations
+        *
+        * @return \Doctrine\Common\Collections\Collection
+        */
+       public function getLocations() {
+               return $this->locations;
+       }
+
        /**
         * Add subscriber
         *
        /**
         * Add subscriber
         *
@@ -216,35 +275,4 @@ class User extends BaseUser {
        public function getSubscriptions() {
                return $this->subscriptions;
        }
        public function getSubscriptions() {
                return $this->subscriptions;
        }
-
-       /**
-        * Add snippet
-        *
-        * @param \Rapsys\AirBundle\Entity\Snippet $snippet
-        *
-        * @return Location
-        */
-       public function addSnippet(\Rapsys\AirBundle\Entity\Snippet $snippet) {
-               $this->snippets[] = $snippet;
-
-               return $this;
-       }
-
-       /**
-        * Remove snippet
-        *
-        * @param \Rapsys\AirBundle\Entity\Snippet $snippet
-        */
-       public function removeSnippet(\Rapsys\AirBundle\Entity\Snippet $snippet) {
-               $this->snippets->removeElement($snippet);
-       }
-
-       /**
-        * Get snippets
-        *
-        * @return \Doctrine\Common\Collections\Collection
-        */
-       public function getSnippets() {
-               return $this->snippets;
-       }
 }
 }