vendor/sulu/sulu/src/Sulu/Bundle/ContactBundle/Entity/Note.php line 22
<?php
/*
* This file is part of Sulu.
*
* (c) Sulu GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Sulu\Bundle\ContactBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use JMS\Serializer\Annotation\Exclude;
use JMS\Serializer\Annotation\Groups;
/**
* Note.
*/
class Note
{
/**
* @var string
*
* @Groups({"fullAccount", "fullContact"})
*/
private $value;
/**
* @var int
*
* @Groups({"fullAccount", "fullContact"})
*/
private $id;
/**
* @var Collection<int, ContactInterface>
*
* @Exclude
*/
private $contacts;
/**
* @var Collection<int, AccountInterface>
*
* @Exclude
*/
private $accounts;
/**
* Constructor.
*/
public function __construct()
{
$this->contacts = new ArrayCollection();
$this->accounts = new ArrayCollection();
}
/**
* Set value.
*
* @param string $value
*
* @return Note
*/
public function setValue($value)
{
$this->value = $value;
return $this;
}
/**
* Get value.
*
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Add contacts.
*
* @return Note
*/
public function addContact(ContactInterface $contacts)
{
$this->contacts[] = $contacts;
return $this;
}
/**
* Remove contacts.
*/
public function removeContact(ContactInterface $contacts)
{
$this->contacts->removeElement($contacts);
}
/**
* Get contacts.
*
* @return Collection<int, ContactInterface>
*/
public function getContacts()
{
return $this->contacts;
}
/**
* Add accounts.
*
* @return Note
*/
public function addAccount(AccountInterface $account)
{
$this->accounts[] = $account;
return $this;
}
/**
* Remove accounts.
*/
public function removeAccount(AccountInterface $account)
{
$this->accounts->removeElement($account);
}
/**
* Get accounts.
*
* @return Collection<int, AccountInterface>
*/
public function getAccounts()
{
return $this->accounts;
}
}