]> Raphaël G. Git Repositories - userbundle/commitdiff
Rename title in civility
authorRaphaël Gertz <git@rapsys.eu>
Tue, 23 Feb 2021 23:08:37 +0000 (00:08 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 23 Feb 2021 23:08:37 +0000 (00:08 +0100)
Entity/Civility.php [moved from Entity/Title.php with 94% similarity]
Entity/User.php
Resources/config/doctrine/Civility.orm.yml [moved from Resources/config/doctrine/Title.orm.yml with 92% similarity]

similarity index 94%
rename from Entity/Title.php
rename to Entity/Civility.php
index bcaf7858c56a82db19f2b4492045abb58b4a2d3c..83c7f47ef4b1d7359452c0108291a6c0207d0df9 100644 (file)
@@ -3,9 +3,9 @@
 namespace Rapsys\UserBundle\Entity;
 
 /**
 namespace Rapsys\UserBundle\Entity;
 
 /**
- * Title
+ * Civility
  */
  */
-class Title {
+class Civility {
        /**
         * @var integer
         */
        /**
         * @var integer
         */
@@ -52,7 +52,7 @@ class Title {
         *
         * @param string $title
         *
         *
         * @param string $title
         *
-        * @return Title
+        * @return Civility
         */
        public function setTitle($title) {
                $this->title = $title;
         */
        public function setTitle($title) {
                $this->title = $title;
@@ -74,7 +74,7 @@ class Title {
         *
         * @param \DateTime $created
         *
         *
         * @param \DateTime $created
         *
-        * @return Title
+        * @return Civility
         */
        public function setCreated($created) {
                $this->created = $created;
         */
        public function setCreated($created) {
                $this->created = $created;
@@ -96,7 +96,7 @@ class Title {
         *
         * @param \DateTime $updated
         *
         *
         * @param \DateTime $updated
         *
-        * @return Title
+        * @return Civility
         */
        public function setUpdated($updated) {
                $this->updated = $updated;
         */
        public function setUpdated($updated) {
                $this->updated = $updated;
@@ -118,7 +118,7 @@ class Title {
         *
         * @param \Rapsys\UserBundle\Entity\User $user
         *
         *
         * @param \Rapsys\UserBundle\Entity\User $user
         *
-        * @return Title
+        * @return Civility
         */
        public function addUser(\Rapsys\UserBundle\Entity\User $user) {
                $this->users[] = $user;
         */
        public function addUser(\Rapsys\UserBundle\Entity\User $user) {
                $this->users[] = $user;
index 8286e55dd59c7c7cad07b03744e768459c23ff29..6d10f33dd9be026fdc5f41eb4e4321db8e3389d2 100644 (file)
@@ -6,7 +6,7 @@ namespace Rapsys\UserBundle\Entity;
 use Rapsys\UserBundle\Entity\Group;
 use Symfony\Component\Security\Core\User\UserInterface;
 use Doctrine\Common\Collections\ArrayCollection;
 use Rapsys\UserBundle\Entity\Group;
 use Symfony\Component\Security\Core\User\UserInterface;
 use Doctrine\Common\Collections\ArrayCollection;
-use Rapsys\UserBundle\Entity\Title;
+use Rapsys\UserBundle\Entity\Civility;
 
 class User implements UserInterface, \Serializable {
        /**
 
 class User implements UserInterface, \Serializable {
        /**
@@ -55,9 +55,9 @@ class User implements UserInterface, \Serializable {
        protected $updated;
 
        /**
        protected $updated;
 
        /**
-        * @var \Rapsys\UserBundle\Entity\Title
+        * @var \Rapsys\UserBundle\Entity\Civility
         */
         */
-       protected $title;
+       protected $civility;
 
        /**
         * @var \Doctrine\Common\Collections\Collection
 
        /**
         * @var \Doctrine\Common\Collections\Collection
@@ -260,19 +260,19 @@ class User implements UserInterface, \Serializable {
        }
 
        /**
        }
 
        /**
-        * Set title
+        * Set civility
         */
         */
-       public function setTitle(Title $title) {
-               $this->title = $title;
+       public function setCivility(Civility $civility) {
+               $this->civility = $civility;
 
                return $this;
        }
 
        /**
 
                return $this;
        }
 
        /**
-        * Get title
+        * Get civility
         */
         */
-       public function getTitle(): Title {
-               return $this->title;
+       public function getCivility(): Civility {
+               return $this->civility;
        }
 
        /**
        }
 
        /**
@@ -326,6 +326,9 @@ class User implements UserInterface, \Serializable {
                ));
        }
 
                ));
        }
 
+       /**
+        * {@inheritdoc}
+        */
        public function getRole() {
                //Retrieve roles
                $roles = $this->getRoles();
        public function getRole() {
                //Retrieve roles
                $roles = $this->getRoles();
@@ -403,6 +406,6 @@ class User implements UserInterface, \Serializable {
         * @return string
         */
        public function __toString(): string {
         * @return string
         */
        public function __toString(): string {
-               return $this->title.' '.$this->forename.' '.$this->surname;
+               return $this->civility.' '.$this->forename.' '.$this->surname;
        }
 }
        }
 }
similarity index 92%
rename from Resources/config/doctrine/Title.orm.yml
rename to Resources/config/doctrine/Civility.orm.yml
index 85354a0120d6fa2928109a25e2e7561012171ea7..a175fa8b04daadc7612ae26428c663f1e888a4e5 100644 (file)
@@ -1,4 +1,4 @@
-Rapsys\UserBundle\Entity\Title:
+Rapsys\UserBundle\Entity\Civility:
     type: mappedSuperclass
     id:
         id:
     type: mappedSuperclass
     id:
         id: