use Doctrine\Common\Collections\ArrayCollection;
/**
- * Tag
+ * Tag.
*
* @XmlRoot("tag")
* @ORM\Table
class Tag
{
/**
- * @var integer
+ * @var int
*
* @Expose
* @ORM\Column(name="id", type="integer")
public function __construct(User $user)
{
- $this->user = $user;
+ $this->user = $user;
$this->entries = new ArrayCollection();
}
+
+ public function __toString()
+ {
+ return $this->label;
+ }
+
/**
- * Get id
+ * Get id.
*
- * @return integer
+ * @return int
*/
public function getId()
{
}
/**
- * Set label
+ * Set label.
+ *
+ * @param string $label
*
- * @param string $label
* @return Tag
*/
public function setLabel($label)
}
/**
- * Get label
+ * Get label.
*
* @return string
*/
$this->entries[] = $entry;
}
+ public function hasEntry($entry)
+ {
+ return $this->entries->contains($entry);
+ }
+
/**
* @return User
*/