id = $id; return $this; } /** * Constructor. */ public function __construct() { $this->alerts = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set label. * * @param string $label * * @return Alertcategory */ public function setLabel($label) { $this->label = $label; return $this; } /** * Get label. * * @return string */ public function getLabel() { return $this->label; } /** * Set color. * * @param string $color * * @return Alertcategory */ public function setColor($color) { $this->color = $color; return $this; } /** * Get color. * * @return string */ public function getColor() { return $this->color; } /** * Set icon. * * @param Icon $icon * * @return Alertcategory */ public function setIcon(Icon $icon = null) { $this->icon = $icon; return $this; } /** * Get icon. * * @return Icon */ public function getIcon() { return $this->icon; } /** * Add alert. * * @return Alertcategory */ public function addAlert(Alert $alert) { $this->alerts[] = $alert; return $this; } /** * Remove alert. */ public function removeAlert(Alert $alert) { $this->alerts->removeElement($alert); } /** * Get alerts. * * @return \Doctrine\Common\Collections\Collection */ public function getAlerts() { return $this->alerts; } }