src/Entity/JobDailyRoutine.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. class JobDailyRoutine {
  7.     /**
  8.      * @var int
  9.      */
  10.     private $id;
  11.     /**
  12.      * @var \App\Entity\Media
  13.      */
  14.     private $avatarPicture;
  15.     /**
  16.      * @var String
  17.      */
  18.     private $avatarPosition;
  19.     /**
  20.      * @var \Doctrine\Common\Collections\Collection
  21.      */
  22.     private $dailyEntries;
  23.     /**
  24.      * @var \Doctrine\Common\Collections\Collection
  25.      */
  26.     private $jobMappings;
  27.     /**
  28.      * @var \DateTime
  29.      */
  30.     private $showAfter;
  31.     /**
  32.      * @var String
  33.      */
  34.     private $routineTitle;
  35.     /**
  36.      * @var String
  37.      */
  38.     private $videoUrl;
  39.     /**
  40.      * @var \App\Entity\Media
  41.      */
  42.     private $routinePicture;
  43.     /**
  44.      * @var \App\Entity\JobDailyRoutineCategory
  45.      */
  46.     private $jobDailyRoutineCategory;
  47.     /**
  48.      * @var \App\Entity\SchoolProfile
  49.      */
  50.     private $schoolProfile;
  51.     /**
  52.      * @var \App\Entity\Media
  53.      */
  54.     private $routinePicture2;
  55.     /**
  56.      * @var \App\Entity\Color
  57.      */
  58.     private $color;
  59.     /**
  60.      * @var \App\Entity\Icon
  61.      */
  62.     private $icon;
  63.     /**
  64.      * @var \App\Entity\IconColor
  65.      */
  66.     private $iconColor;
  67.     /**
  68.      * @var \Doctrine\Common\Collections\Collection
  69.      */
  70.     private $interestFields;  
  71.     /**
  72.      * @var \Doctrine\Common\Collections\Collection
  73.      */
  74.     private $tags;
  75.     /**
  76.      * @var \App\Entity\KeyValue
  77.      */
  78.     private $gradient;
  79.     /**
  80.      * @var boolean
  81.      */
  82.     private $preSelected false;
  83.     /**
  84.      * @var \DateTime
  85.      */
  86.     private $createdAt;
  87.     /**
  88.      * Constructor
  89.      */
  90.     public function __construct() {
  91.         $this->dailyEntries = new ArrayCollection();
  92.         $this->jobMappings = new ArrayCollection();
  93.         $this->interestFields = new ArrayCollection();
  94.         $this->tags = new ArrayCollection();
  95.         $this->preSelected true;
  96.     }
  97.     /**
  98.      * Get id
  99.      *
  100.      * @return integer
  101.      */
  102.     public function getId() {
  103.         return $this->id;
  104.     }
  105.     /**
  106.      * Add dailyEntry.
  107.      *
  108.      * @param \App\Entity\JobDailyRoutineEntry $dailyEntry
  109.      *
  110.      * @return JobDailyRoutine
  111.      */
  112.     public function addDailyEntry(\App\Entity\JobDailyRoutineEntry $dailyEntry) {
  113.         $this->dailyEntries[] = $dailyEntry;
  114.         return $this;
  115.     }
  116.     /**
  117.      * Remove dailyEntry.
  118.      *
  119.      * @param \App\Entity\JobDailyRoutineEntry $dailyEntry
  120.      *
  121.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  122.      */
  123.     public function removeDailyEntry(\App\Entity\JobDailyRoutineEntry $dailyEntry) {
  124.         return $this->dailyEntries->removeElement($dailyEntry);
  125.     }
  126.     /**
  127.      * Get dailyEntries.
  128.      *
  129.      * @return \Doctrine\Common\Collections\Collection
  130.      */
  131.     public function getDailyEntries() {
  132.         return $this->dailyEntries;
  133.     }
  134.     public function countEntries() {
  135.         return count($this->dailyEntries);
  136.     }
  137.     /**
  138.      * Set showAfter.
  139.      *
  140.      * @param \DateTime $showAfter
  141.      *
  142.      * @return JobDailyRoutine
  143.      */
  144.     public function setShowAfter($showAfter) {
  145.         $this->showAfter $showAfter;
  146.         return $this;
  147.     }
  148.     /**
  149.      * Get showAfter.
  150.      *
  151.      * @return \DateTime
  152.      */
  153.     public function getShowAfter() {
  154.         return $this->showAfter;
  155.     }
  156.     /**
  157.      * Set routinePicture.
  158.      *
  159.      * @param \App\Entity\Media|null $routinePicture
  160.      *
  161.      * @return JobDailyRoutine
  162.      */
  163.     public function setRoutinePicture(\App\Entity\Media $routinePicture null) {
  164.         $this->routinePicture $routinePicture;
  165.         return $this;
  166.     }
  167.     /**
  168.      * Get routinePicture.
  169.      *
  170.      * @return \App\Entity\Media|null
  171.      */
  172.     public function getRoutinePicture() {
  173.         return $this->routinePicture;
  174.     }
  175.     /**
  176.      * Set jobDailyRoutineCategory.
  177.      *
  178.      * @param \App\Entity\JobDailyRoutineCategory|null $jobDailyRoutineCategory
  179.      *
  180.      * @return JobDailyRoutine
  181.      */
  182.     public function setJobDailyRoutineCategory(\App\Entity\JobDailyRoutineCategory $jobDailyRoutineCategory null) {
  183.         $this->jobDailyRoutineCategory $jobDailyRoutineCategory;
  184.         return $this;
  185.     }
  186.     /**
  187.      * Get jobDailyRoutineCategory.
  188.      *
  189.      * @return \App\Entity\JobDailyRoutineCategory|null
  190.      */
  191.     public function getJobDailyRoutineCategory() {
  192.         return $this->jobDailyRoutineCategory;
  193.     }
  194.     /**
  195.      * Set schoolProfile.
  196.      *
  197.      * @param \App\Entity\SchoolProfile|null $schoolProfile
  198.      *
  199.      * @return JobDailyRoutine
  200.      */
  201.     public function setSchoolProfile(\App\Entity\SchoolProfile $schoolProfile null) {
  202.         $this->schoolProfile $schoolProfile;
  203.         return $this;
  204.     }
  205.     /**
  206.      * Get schoolProfile.
  207.      *
  208.      * @return \App\Entity\SchoolProfile|null
  209.      */
  210.     public function getSchoolProfile() {
  211.         return $this->schoolProfile;
  212.     }
  213.     /**
  214.      * Set routinePicture2.
  215.      *
  216.      * @param \App\Entity\Media|null $routinePicture2
  217.      *
  218.      * @return JobDailyRoutine
  219.      */
  220.     public function setRoutinePicture2(\App\Entity\Media $routinePicture2 null) {
  221.         $this->routinePicture2 $routinePicture2;
  222.         return $this;
  223.     }
  224.     /**
  225.      * Get routinePicture2.
  226.      *
  227.      * @return \App\Entity\Media|null
  228.      */
  229.     public function getRoutinePicture2() {
  230.         return $this->routinePicture2;
  231.     }
  232.     /**
  233.      * Set avatarPicture.
  234.      *
  235.      * @param \App\Entity\Media|null $avatarPicture
  236.      *
  237.      * @return JobDailyRoutine
  238.      */
  239.     public function setAvatarPicture(\App\Entity\Media $avatarPicture null) {
  240.         $this->avatarPicture $avatarPicture;
  241.         return $this;
  242.     }
  243.     /**
  244.      * Get avatarPicture.
  245.      *
  246.      * @return \App\Entity\Media|null
  247.      */
  248.     public function getAvatarPicture() {
  249.         return $this->avatarPicture;
  250.     }
  251.     /**
  252.      * Set avatarPosition
  253.      *
  254.      * @param string $avatarPosition
  255.      *
  256.      * @return JobDailyRoutine
  257.      */
  258.     public function setAvatarPosition($avatarPosition) {
  259.         $this->avatarPosition $avatarPosition;
  260.         return $this;
  261.     }
  262.     /**
  263.      * Get avatarPosition
  264.      *
  265.      * @return string
  266.      */
  267.     public function getAvatarPosition() {
  268.         return $this->avatarPosition;
  269.     }
  270.     /**
  271.      * Set color.
  272.      *
  273.      * @param \App\Entity\Color|null $color
  274.      *
  275.      * @return JobDailyRoutine
  276.      */
  277.     public function setColor(\App\Entity\Color $color null) {
  278.         $this->color $color;
  279.         return $this;
  280.     }
  281.     /**
  282.      * Get color.
  283.      *
  284.      * @return \App\Entity\Color|null
  285.      */
  286.     public function getColor() {
  287.         return $this->color;
  288.     }
  289.     /**
  290.      * Set icon.
  291.      *
  292.      * @param \App\Entity\Icon|null $icon
  293.      *
  294.      * @return JobDailyRoutine
  295.      */
  296.     public function setIcon(\App\Entity\Icon $icon null) {
  297.         $this->icon $icon;
  298.         return $this;
  299.     }
  300.     /**
  301.      * Get icon.
  302.      *
  303.      * @return \App\Entity\Icon|null
  304.      */
  305.     public function getIcon() {
  306.         return $this->icon;
  307.     }
  308.     /**
  309.      * Set iconColor.
  310.      *
  311.      * @param \App\Entity\Color|null $iconColor
  312.      *
  313.      * @return JobDailyRoutine
  314.      */
  315.     public function setIconColor(\App\Entity\Color $iconColor null) {
  316.         $this->iconColor $iconColor;
  317.         return $this;
  318.     }
  319.     /**
  320.      * Get iconColor.
  321.      *
  322.      * @return \App\Entity\Color|null
  323.      */
  324.     public function getIconColor() {
  325.         return $this->iconColor;
  326.     }
  327.     /**
  328.      * Add tag.
  329.      *
  330.      * @param \App\Entity\Tag $tag
  331.      *
  332.      * @return JobDailyRoutine
  333.      */
  334.     public function addTag(\App\Entity\Tag $tag) {
  335.         $this->tags[] = $tag;
  336.         return $this;
  337.     }
  338.     /**
  339.      * Remove tag.
  340.      *
  341.      * @param \App\Entity\Tag $tag
  342.      *
  343.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  344.      */
  345.     public function removeTag(\App\Entity\Tag $tag) {
  346.         return $this->tags->removeElement($tag);
  347.     }
  348.     /**
  349.      * Get tags.
  350.      *
  351.      * @return \Doctrine\Common\Collections\Collection
  352.      */
  353.     public function getTags() {
  354.         return $this->tags;
  355.     }
  356.     
  357.     public function getGradient() {
  358.         return $this->gradient;
  359.     }
  360.     public function setGradient($gradient) {
  361.         $this->gradient $gradient;
  362.     }
  363.     public function getRoutineTitle() {
  364.         return $this->routineTitle;
  365.     }
  366.     public function getVideoUrl() {
  367.         return $this->videoUrl;
  368.     }
  369.     public function setRoutineTitle($routineTitle) {
  370.         $this->routineTitle $routineTitle;
  371.     }
  372.     public function setVideoUrl($videoUrl) {
  373.         $this->videoUrl $videoUrl;
  374.     }
  375.     public function getJobMappings() {
  376.         return $this->jobMappings;
  377.     }
  378.     public function setJobMappings($jobMappings) {
  379.         $this->jobMappings $jobMappings;
  380.     }
  381.     public function addJobMapping($jobMapping) {
  382.         $this->jobMappings[] = $jobMapping;
  383.         return $this;
  384.     }
  385.     public function getPreSelected() {
  386.         return $this->preSelected;
  387.     }
  388.     public function setPreSelected($preSelected) {
  389.         $this->preSelected $preSelected;
  390.     }
  391.   public function getInterestFields(): \Doctrine\Common\Collections\Collection {
  392.         return $this->interestFields;
  393.     }
  394.     public function setInterestFields(\Doctrine\Common\Collections\Collection $interestFields): void {
  395.         $this->interestFields $interestFields;
  396.     }
  397.     
  398.     /**
  399.      * Set createdAt.
  400.      *
  401.      * @param \DateTime $createdAt
  402.      *
  403.      * @return JobDailyRoutine
  404.      */
  405.     public function setCreatedAt($createdAt) {
  406.         $this->createdAt $createdAt;
  407.         return $this;
  408.     }
  409.     /**
  410.      * Get createdAt.
  411.      *
  412.      * @return \DateTime
  413.      */
  414.     public function getCreatedAt() {
  415.         return $this->createdAt;
  416.     }
  417.     public function getBicID() {
  418.         if (count($this->jobMappings) > 0) {
  419.             /* @var $jobMapping App\Entity\JobMapping */
  420.             $jobMapping $this->jobMappings[0];
  421.             $job $jobMapping->getJob();
  422.             return $job->getBicID();
  423.         }
  424.         return 0;
  425.     }
  426.     public function getJobID() {
  427.         if (count($this->jobMappings) > 0) {
  428.             /* @var $jobMapping App\Entity\JobMapping */
  429.             $jobMapping $this->jobMappings[0];
  430.             $job $jobMapping->getJob();
  431.             return $job->getId();
  432.         }
  433.         return 0;
  434.     }
  435.     public function getJobName() {
  436.         if (empty($this->jobMappings)) {
  437.             return '';
  438.         }
  439.         $job $this->jobMappings[0]->getJob();
  440.         return $job->getName();
  441.     }
  442. }