src/Entity/People.php line 18

Open in your IDE?
  1. <?php
  2. // src//App/Entity/People.php
  3. namespace App\Entity;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use App\Entity\User as User;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. /**
  10.  * People
  11.  *
  12.  * @ORM\Table()
  13.  * @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
  14.  * @ORM\Entity(repositoryClass="App\Repository\PeopleRepository")
  15.  */
  16. class People
  17. {
  18.     public function __construct()
  19.     {
  20.         $this->reports = new ArrayCollection();
  21.     }
  22.     /**
  23.      * @var integer
  24.      *
  25.      * @ORM\Column(name="id", type="integer")
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="AUTO")
  28.      */
  29.     private $id;
  30.     /**
  31.      * @ORM\OneToOne(targetEntity="User", inversedBy="person", cascade={"persist"})
  32.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  33.      */
  34.     private $user;
  35.     /**
  36.      * @var string
  37.      *
  38.      * @ORM\Column(name="firstName", type="string", length=100)
  39.      */
  40.     private $firstName;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @ORM\Column(name="lastName", type="string", length=100)
  45.      */
  46.     private $lastName;
  47.     /**
  48.      * @var string
  49.      * @Gedmo\Slug(fields={"firstName", "lastName"}, updatable=false)
  50.      * @ORM\Column(name="slug", type="string", length=255, unique=true)
  51.      */
  52.     private $slug;
  53.     /**
  54.      * @var string
  55.      *
  56.      * @ORM\Column(name="roleTitle", type="string", length=255, nullable=true)
  57.      */
  58.     private $roleTitle;
  59.     /**
  60.      * @var string
  61.      *
  62.      * @ORM\Column(name="team", type="string", length=255, nullable=true)
  63.      */
  64.     private $team;
  65.     /**
  66.      * @ORM\ManyToOne(targetEntity="People", inversedBy="reports")
  67.      * @ORM\JoinColumn(name="manager_id", referencedColumnName="id")
  68.      **/
  69.     private $manager;
  70.     /**
  71.      * @ORM\OneToMany(targetEntity="People", mappedBy="manager")
  72.      */
  73.     private $reports;
  74.     /**
  75.      * @var string
  76.      *
  77.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  78.      */
  79.     private $email;
  80.     /**
  81.      * @var string
  82.      *
  83.      * @ORM\Column(name="phoneNumber", type="string", length=25, nullable=true)
  84.      */
  85.     private $phoneNumber;
  86.     /**
  87.      * @var string
  88.      *
  89.      * @ORM\Column(name="phoneExtension", type="string", length=10, nullable=true)
  90.      */
  91.     private $phoneExtension;
  92.     /**
  93.      * @var string
  94.      *
  95.      * @ORM\Column(name="mobileNumber", type="string", length=25, nullable=true)
  96.      */
  97.     private $mobileNumber;
  98.     /**
  99.      * @var string
  100.      *
  101.      * @ORM\Column(name="faxNumber", type="string", length=25, nullable=true)
  102.      */
  103.     private $faxNumber;
  104.     /**
  105.      * @var string
  106.      *
  107.      * @ORM\Column(name="skypeName", type="string", length=255, nullable=true)
  108.      */
  109.     private $skypeName;
  110.     /**
  111.      * @var string
  112.      *
  113.      * @ORM\Column(name="twitterName", type="string", length=255, nullable=true)
  114.      */
  115.     private $twitterName;
  116.     /**
  117.      * @var string
  118.      *
  119.      * @ORM\Column(name="facebookLink", type="string", length=255, nullable=true)
  120.      */
  121.     private $facebookLink;
  122.     /**
  123.      * @var string
  124.      *
  125.      * @ORM\Column(name="linkedInLink", type="string", length=255, nullable=true)
  126.      */
  127.     private $linkedInLink;
  128.     /**
  129.      * @var string
  130.      *
  131.      * @ORM\Column(name="googlePlusLink", type="string", length=255, nullable=true)
  132.      */
  133.     private $googlePlusLink;
  134.     /**
  135.      * @var string
  136.      *
  137.      * @ORM\Column(name="specialities", type="text", nullable=true)
  138.      */
  139.     private $specialities;
  140.     /**
  141.      * @var string
  142.      *
  143.      * @ORM\Column(name="bio", type="text", nullable=true)
  144.      */
  145.     private $bio;
  146.     /**
  147.      * @var string
  148.      *
  149.      * @ORM\Column(name="interests", type="text", nullable=true)
  150.      */
  151.     private $interests;
  152.     /**
  153.      * @var string
  154.      *
  155.      * @ORM\Column(name="recommendations", type="text", nullable=true)
  156.      */
  157.     private $recommendations;
  158.     /**
  159.      * @var string
  160.      *
  161.      * @ORM\Column(name="companyQuote", type="text", nullable=true)
  162.      */
  163.     private $companyQuote;
  164.     /**
  165.      * @var string
  166.      *
  167.      * @ORM\Column(name="thumbnailName", type="string", length=255, nullable=true)
  168.      */
  169.     private $thumbnailName;
  170.     /**
  171.      * @var string
  172.      *
  173.      * @ORM\Column(name="photoName", type="string", length=255, nullable=true)
  174.      */
  175.     private $photoName;
  176.     /**
  177.      * @var string
  178.      *
  179.      * @ORM\Column(name="backgroundName", type="string", length=255, nullable=true)
  180.      */
  181.     private $backgroundName;
  182.     /**
  183.      * @var string
  184.      *
  185.      * @ORM\Column(name="crmID", type="string", length=255, nullable=true)
  186.      */
  187.     private $crmID;
  188.         public function __toString()
  189.         {
  190.                 return "{$this->getCrmID()}";
  191.         }
  192.     /**
  193.      * @var boolean
  194.      *
  195.      * @ORM\Column(name="publish", type="boolean", nullable=true)
  196.      */
  197.     private $publish false;
  198.     /**
  199.      * @Gedmo\SortablePosition
  200.      * @ORM\Column(name="position", type="integer")
  201.      */
  202.     private $position;
  203.     /**
  204.      * @var DateTime $dateStarted
  205.      *
  206.      * @ORM\Column(name="datePublished", type="datetime", nullable=true)
  207.      */
  208.     private $dateStarted;
  209.     /**
  210.      * @Gedmo\Timestampable(on="create")
  211.      * @ORM\Column(type="datetime")
  212.      */
  213.     private $created;
  214.     /**
  215.      * @Gedmo\Timestampable(on="update")
  216.      * @ORM\Column(type="datetime")
  217.      */
  218.     private $updated;
  219.     /**
  220.      * @var User $createdBy
  221.      *
  222.      * @Gedmo\Blameable(on="create")
  223.      * @ORM\ManyToOne(targetEntity="User")
  224.      * @ORM\JoinColumn(name="created_by", referencedColumnName="id")
  225.      */
  226.     private $createdBy;
  227.     /**
  228.      * @var User $updatedBy
  229.      *
  230.      * @Gedmo\Blameable(on="update")
  231.      * @ORM\ManyToOne(targetEntity="User")
  232.      * @ORM\JoinColumn(name="updated_by", referencedColumnName="id")
  233.      */
  234.     private $updatedBy;
  235.     /**
  236.      * Get id
  237.      *
  238.      * @return integer
  239.      */
  240.     public function getId()
  241.     {
  242.         return $this->id;
  243.     }
  244.     /**
  245.      * Set firstName
  246.      *
  247.      * @param string $firstName
  248.      * @return People
  249.      */
  250.     public function setFirstName($firstName)
  251.     {
  252.         $this->firstName $firstName;
  253.         return $this;
  254.     }
  255.     /**
  256.      * Get firstName
  257.      *
  258.      * @return string
  259.      */
  260.     public function getFirstName()
  261.     {
  262.         return $this->firstName;
  263.     }
  264.     /**
  265.      * Set lastName
  266.      *
  267.      * @param string $lastName
  268.      * @return People
  269.      */
  270.     public function setLastName($lastName)
  271.     {
  272.         $this->lastName $lastName;
  273.         return $this;
  274.     }
  275.     /**
  276.      * Get lastName
  277.      *
  278.      * @return string
  279.      */
  280.     public function getLastName()
  281.     {
  282.         return $this->lastName;
  283.     }
  284.     /**
  285.      * Set roleTitle
  286.      *
  287.      * @param string $roleTitle
  288.      * @return People
  289.      */
  290.     public function setRoleTitle($roleTitle)
  291.     {
  292.         $this->roleTitle $roleTitle;
  293.         return $this;
  294.     }
  295.     /**
  296.      * Get roleTitle
  297.      *
  298.      * @return string
  299.      */
  300.     public function getRoleTitle()
  301.     {
  302.         return $this->roleTitle;
  303.     }
  304.     /**
  305.      * Set team
  306.      *
  307.      * @param string $team
  308.      * @return People
  309.      */
  310.     public function setTeam($team)
  311.     {
  312.         $this->team $team;
  313.         return $this;
  314.     }
  315.     /**
  316.      * Get team
  317.      *
  318.      * @return string
  319.      */
  320.     public function getTeam()
  321.     {
  322.         return $this->team;
  323.     }
  324.     /**
  325.      * Set manager
  326.      *
  327.      * @param People $manager
  328.      * @return People
  329.      */
  330.     public function setManager(People $manager null)
  331.     {
  332.         $this->manager $manager;
  333.         return $this;
  334.     }
  335.     /**
  336.      * Get manager
  337.      *
  338.      * @return People
  339.      */
  340.     public function getManager()
  341.     {
  342.         return $this->manager;
  343.     }
  344.     /**
  345.      * Set email
  346.      *
  347.      * @param string $email
  348.      * @return People
  349.      */
  350.     public function setEmail($email)
  351.     {
  352.         $this->email $email;
  353.         return $this;
  354.     }
  355.     /**
  356.      * Get email
  357.      *
  358.      * @return string
  359.      */
  360.     public function getEmail()
  361.     {
  362.         return $this->email;
  363.     }
  364.     /**
  365.      * Set phoneNumber
  366.      *
  367.      * @param string $phoneNumber
  368.      * @return People
  369.      */
  370.     public function setPhoneNumber($phoneNumber)
  371.     {
  372.         $this->phoneNumber $phoneNumber;
  373.         return $this;
  374.     }
  375.     /**
  376.      * Get phoneNumber
  377.      *
  378.      * @return string
  379.      */
  380.     public function getPhoneNumber()
  381.     {
  382.         return $this->phoneNumber;
  383.     }
  384.     /**
  385.      * Set mobileNumber
  386.      *
  387.      * @param string $mobileNumber
  388.      * @return People
  389.      */
  390.     public function setMobileNumber($mobileNumber)
  391.     {
  392.         $this->mobileNumber $mobileNumber;
  393.         return $this;
  394.     }
  395.     /**
  396.      * Get mobileNumber
  397.      *
  398.      * @return string
  399.      */
  400.     public function getMobileNumber()
  401.     {
  402.         return $this->mobileNumber;
  403.     }
  404.     /**
  405.      * Set faxNumber
  406.      *
  407.      * @param string $faxNumber
  408.      * @return People
  409.      */
  410.     public function setFaxNumber($faxNumber)
  411.     {
  412.         $this->faxNumber $faxNumber;
  413.         return $this;
  414.     }
  415.     /**
  416.      * Get faxNumber
  417.      *
  418.      * @return string
  419.      */
  420.     public function getFaxNumber()
  421.     {
  422.         return $this->faxNumber;
  423.     }
  424.     /**
  425.      * Set skypeName
  426.      *
  427.      * @param string $skypeName
  428.      * @return People
  429.      */
  430.     public function setSkypeName($skypeName)
  431.     {
  432.         $this->skypeName $skypeName;
  433.         return $this;
  434.     }
  435.     /**
  436.      * Get skypeName
  437.      *
  438.      * @return string
  439.      */
  440.     public function getSkypeName()
  441.     {
  442.         return $this->skypeName;
  443.     }
  444.     /**
  445.      * Set twitterName
  446.      *
  447.      * @param string $twitterName
  448.      * @return People
  449.      */
  450.     public function setTwitterName($twitterName)
  451.     {
  452.         $this->twitterName $twitterName;
  453.         return $this;
  454.     }
  455.     /**
  456.      * Get twitterName
  457.      *
  458.      * @return string
  459.      */
  460.     public function getTwitterName()
  461.     {
  462.         return $this->twitterName;
  463.     }
  464.     /**
  465.      * Set facebookLink
  466.      *
  467.      * @param string $facebookLink
  468.      * @return People
  469.      */
  470.     public function setFacebookLink($facebookLink)
  471.     {
  472.         $this->facebookLink $facebookLink;
  473.         return $this;
  474.     }
  475.     /**
  476.      * Get facebookLink
  477.      *
  478.      * @return string
  479.      */
  480.     public function getFacebookLink()
  481.     {
  482.         return $this->facebookLink;
  483.     }
  484.     /**
  485.      * Set linkedInLink
  486.      *
  487.      * @param string $linkedInLink
  488.      * @return People
  489.      */
  490.     public function setLinkedInLink($linkedInLink)
  491.     {
  492.         $this->linkedInLink $linkedInLink;
  493.         return $this;
  494.     }
  495.     /**
  496.      * Get linkedInLink
  497.      *
  498.      * @return string
  499.      */
  500.     public function getLinkedInLink()
  501.     {
  502.         return $this->linkedInLink;
  503.     }
  504.     /**
  505.      * Set googlePlusLink
  506.      *
  507.      * @param string $googlePlusLink
  508.      * @return People
  509.      */
  510.     public function setGooglePlusLink($googlePlusLink)
  511.     {
  512.         $this->googlePlusLink $googlePlusLink;
  513.         return $this;
  514.     }
  515.     /**
  516.      * Get googlePlusLink
  517.      *
  518.      * @return string
  519.      */
  520.     public function getGooglePlusLink()
  521.     {
  522.         return $this->googlePlusLink;
  523.     }
  524.     /**
  525.      * Set specialities
  526.      *
  527.      * @param string $specialities
  528.      * @return People
  529.      */
  530.     public function setSpecialities($specialities)
  531.     {
  532.         $this->specialities $specialities;
  533.         return $this;
  534.     }
  535.     /**
  536.      * Get specialities
  537.      *
  538.      * @return string
  539.      */
  540.     public function getSpecialities()
  541.     {
  542.         return $this->specialities;
  543.     }
  544.     /**
  545.      * Set bio
  546.      *
  547.      * @param string $bio
  548.      * @return People
  549.      */
  550.     public function setBio($bio)
  551.     {
  552.         $this->bio $bio;
  553.         return $this;
  554.     }
  555.     /**
  556.      * Get bio
  557.      *
  558.      * @return string
  559.      */
  560.     public function getBio()
  561.     {
  562.         return $this->bio;
  563.     }
  564.     /**
  565.      * Set interests
  566.      *
  567.      * @param string $interests
  568.      * @return People
  569.      */
  570.     public function setInterests($interests)
  571.     {
  572.         $this->interests $interests;
  573.         return $this;
  574.     }
  575.     /**
  576.      * Get recommendations
  577.      *
  578.      * @return string
  579.      */
  580.     public function getRecommendations()
  581.     {
  582.         return $this->recommendations;
  583.     }
  584.     /**
  585.      * Set recommendations
  586.      *
  587.      * @param string $recommendations
  588.      * @return People
  589.      */
  590.     public function setRecommendations($recommendations)
  591.     {
  592.         $this->recommendations $recommendations;
  593.         return $this;
  594.     }
  595.     /**
  596.      * Get interests
  597.      *
  598.      * @return string
  599.      */
  600.     public function getInterests()
  601.     {
  602.         return $this->interests;
  603.     }
  604.     /**
  605.      * Set thumbnailName
  606.      *
  607.      * @param string $thumbnailName
  608.      * @return People
  609.      */
  610.     public function setThumbnailName($thumbnailName)
  611.     {
  612.         $this->thumbnailName $thumbnailName;
  613.         return $this;
  614.     }
  615.     /**
  616.      * Get thumbnailName
  617.      *
  618.      * @return string
  619.      */
  620.     public function getThumbnailName()
  621.     {
  622.         return $this->thumbnailName;
  623.     }
  624.     /**
  625.      * Set photoName
  626.      *
  627.      * @param string $photoName
  628.      * @return People
  629.      */
  630.     public function setPhotoName($photoName)
  631.     {
  632.         $this->photoName $photoName;
  633.         return $this;
  634.     }
  635.     /**
  636.      * Get photoName
  637.      *
  638.      * @return string
  639.      */
  640.     public function getPhotoName()
  641.     {
  642.         return $this->photoName;
  643.     }
  644.     /**
  645.      * Set backgroundName
  646.      *
  647.      * @param string $backgroundName
  648.      * @return People
  649.      */
  650.     public function setBackgroundName($backgroundName)
  651.     {
  652.         $this->backgroundName $backgroundName;
  653.         return $this;
  654.     }
  655.     /**
  656.      * Get backgroundName
  657.      *
  658.      * @return string
  659.      */
  660.     public function getBackgroundName()
  661.     {
  662.         return $this->backgroundName;
  663.     }
  664.     public function setSlug($slug)
  665.     {
  666.         $this->slug $slug;
  667.     }
  668.     /**
  669.      * Get slug
  670.      *
  671.      * @return string
  672.      */
  673.     public function getSlug()
  674.     {
  675.         return $this->slug;
  676.     }
  677.     /**
  678.      * Set created
  679.      *
  680.      * @param DateTime $created
  681.      * @return People
  682.      */
  683.     public function setCreated($created)
  684.     {
  685.         $this->created $created;
  686.         return $this;
  687.     }
  688.     /**
  689.      * Get created
  690.      *
  691.      * @return DateTime
  692.      */
  693.     public function getCreated()
  694.     {
  695.         return $this->created;
  696.     }
  697.     /**
  698.      * Set updated
  699.      *
  700.      * @param DateTime $updated
  701.      * @return People
  702.      */
  703.     public function setUpdated($updated)
  704.     {
  705.         $this->updated $updated;
  706.         return $this;
  707.     }
  708.     /**
  709.      * Get updated
  710.      *
  711.      * @return DateTime
  712.      */
  713.     public function getUpdated()
  714.     {
  715.         return $this->updated;
  716.     }
  717.     /**
  718.      * Get createdBy
  719.      *
  720.      * @return \App\Entity\User
  721.      */
  722.     public function getCreatedBy()
  723.     {
  724.         return $this->createdBy;
  725.     }
  726.     /**
  727.      * Get updatedBy
  728.      *
  729.      * @return \App\Entity\User
  730.      */
  731.     public function getUpdatedBy()
  732.     {
  733.         return $this->updatedBy;
  734.     }
  735.     /**
  736.      * Set createdBy
  737.      *
  738.      * @param \App\Entity\User $createdBy
  739.      *
  740.      * @return People
  741.      */
  742.     public function setCreatedBy(\App\Entity\User $createdBy null)
  743.     {
  744.         $this->createdBy $createdBy;
  745.         return $this;
  746.     }
  747.     /**
  748.      * Set updatedBy
  749.      *
  750.      * @param \App\Entity\User $updatedBy
  751.      *
  752.      * @return People
  753.      */
  754.     public function setUpdatedBy(\App\Entity\User $updatedBy null)
  755.     {
  756.         $this->updatedBy $updatedBy;
  757.         return $this;
  758.     }
  759.     function getFullName()
  760.     {
  761.         return sprintf('%s %s'$this->firstName$this->lastName);
  762.     }
  763.     /**
  764.      * Set user
  765.      *
  766.      * @param \App\Entity\User $user
  767.      *
  768.      * @return People
  769.      */
  770.     public function setUser(\App\Entity\User $user null)
  771.     {
  772.         $this->user $user;
  773.         return $this;
  774.     }
  775.     /**
  776.      * Get user
  777.      *
  778.      * @return \App\Entity\User
  779.      */
  780.     public function getUser()
  781.     {
  782.         return $this->user;
  783.     }
  784.     /**
  785.      * Add reports
  786.      *
  787.      * @param People $reports
  788.      * @return People
  789.      */
  790.     public function addReport(People $reports)
  791.     {
  792.         $this->reports[] = $reports;
  793.         return $this;
  794.     }
  795.     /**
  796.      * Remove reports
  797.      *
  798.      * @param People $reports
  799.      */
  800.     public function removeReport(People $reports)
  801.     {
  802.         $this->reports->removeElement($reports);
  803.     }
  804.     /**
  805.      * Get reports
  806.      *
  807.      * @return \Doctrine\Common\Collections\Collection
  808.      */
  809.     public function getReports()
  810.     {
  811.         return $this->reports;
  812.     }
  813.     /**
  814.      * Set crmID
  815.      *
  816.      * @param string $crmID
  817.      * @return People
  818.      */
  819.     public function setCrmID($crmID)
  820.     {
  821.         $this->crmID $crmID;
  822.         return $this;
  823.     }
  824.     /**
  825.      * Get crmID
  826.      *
  827.      * @return string
  828.      */
  829.     public function getCrmID()
  830.     {
  831.         return $this->crmID;
  832.     }
  833.     /**
  834.      * Set publish
  835.      *
  836.      * @param boolean $publish
  837.      * @return People
  838.      */
  839.     public function setPublish($publish)
  840.     {
  841.         $this->publish $publish;
  842.         return $this;
  843.     }
  844.     /**
  845.      * Get publish
  846.      *
  847.      * @return boolean
  848.      */
  849.     public function getPublish()
  850.     {
  851.         return $this->publish;
  852.     }
  853.     public function setPosition($position)
  854.     {
  855.         $this->position $position;
  856.     }
  857.     public function getPosition()
  858.     {
  859.         return $this->position;
  860.     }
  861.     /**
  862.      * Set companyQuote
  863.      *
  864.      * @param string $companyQuote
  865.      * @return People
  866.      */
  867.     public function setCompanyQuote($companyQuote)
  868.     {
  869.         $this->companyQuote $companyQuote;
  870.         return $this;
  871.     }
  872.     /**
  873.      * Get companyQuote
  874.      *
  875.      * @return string
  876.      */
  877.     public function getCompanyQuote()
  878.     {
  879.         return $this->companyQuote;
  880.     }
  881.     /**
  882.      * Set dateStarted
  883.      *
  884.      * @param DateTime $dateStarted
  885.      * @return People
  886.      */
  887.     public function setDateStarted($dateStarted)
  888.     {
  889.         $this->dateStarted $dateStarted;
  890.         return $this;
  891.     }
  892.     /**
  893.      * Get dateStarted
  894.      *
  895.      * @return datetime
  896.      */
  897.     public function getDateStarted()
  898.     {
  899.         return $this->dateStarted;
  900.     }
  901.     /**
  902.      * Set phoneExtension
  903.      *
  904.      * @param string $phoneExtension
  905.      * @return People
  906.      */
  907.     public function setPhoneExtension($phoneExtension)
  908.     {
  909.         $this->phoneExtension $phoneExtension;
  910.         return $this;
  911.     }
  912.     /**
  913.      * Get phoneExtension
  914.      *
  915.      * @return string
  916.      */
  917.     public function getPhoneExtension()
  918.     {
  919.         return $this->phoneExtension;
  920.     }
  921. }