<?phpnamespace JF\JuridicusBundle\Entity;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;/** * Faq */class Faq{ const CLASSNAME = __CLASS__; /** * @var integer */ private $id; /** * @var integer */ private $sortierung; /** * @var string * @Assert\NotBlank */ private $frage; /** * @var string * @Assert\NotBlank */ private $antwort; /** * @var \DateTime * @Assert\Type(\DateTimeInterface::class) */ private $created_at; /** * @var \DateTime * @Assert\Type(\DateTimeInterface::class) */ private $updated_at; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set sortierung * * @param integer $sortierung * @return Faq */ public function setSortierung($sortierung) { $this->sortierung = $sortierung; return $this; } /** * Get sortierung * * @return integer */ public function getSortierung() { return $this->sortierung; } /** * Set frage * * @param string $frage * @return Faq */ public function setFrage($frage) { $this->frage = $frage; return $this; } /** * Get frage * * @return string */ public function getFrage() { return $this->frage; } /** * Set antwort * * @param string $antwort * @return Faq */ public function setAntwort($antwort) { $this->antwort = $antwort; return $this; } /** * Get antwort * * @return string */ public function getAntwort() { return $this->antwort; } /** * Set created_at * * @param \DateTime $createdAt * @return Faq */ public function setCreatedAt($createdAt) { $this->created_at = $createdAt; return $this; } /** * Get created_at * * @return \DateTime */ public function getCreatedAt() { return $this->created_at; } /** * Set updated_at * * @param \DateTime $updatedAt * @return Faq */ public function setUpdatedAt($updatedAt) { $this->updated_at = $updatedAt; return $this; } /** * Get updated_at * * @return \DateTime */ public function getUpdatedAt() { return $this->updated_at; } public function __toString() { return sprintf('FAQ Item #%d', $this->getSortierung()); } /** * @param array replacements * @return string */ public function antwortReplace( array $replacements ) { $body = $this->antwort; if ( isset( $replacements['host'] ) ) { $body = str_replace('[HOST]', sprintf( '<a href="http://%1$s">%1$s</a>', $replacements['host'] ), $body); } if ( isset( $replacements['anzahl_pruefer'] ) ) { $body = str_replace('[ANZAHL_PRUEFER]',$replacements['anzahl_pruefer'], $body); } return $body; }}