33 lines
847 B
PHP
33 lines
847 B
PHP
<?php
|
|
|
|
namespace CoursEndingBundle\Model;
|
|
|
|
use CoursEndingBundle\Model\Base\Form as BaseForm;
|
|
use JMS\Serializer\Annotation\VirtualProperty;
|
|
use Propel\Runtime\ActiveQuery\Criteria;
|
|
use Propel\Runtime\Connection\ConnectionInterface;
|
|
use CoursEndingBundle\DataRestContainer;
|
|
|
|
class Form extends BaseForm
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
* @JMS\Serializer\Annotation\SerializedName("questions")
|
|
* @JMS\Serializer\Annotation\VirtualProperty
|
|
*/
|
|
public function getQuestionsRest()
|
|
{
|
|
return new DataRestContainer(parent::getQuestions()->getData());
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
* @JMS\Serializer\Annotation\SerializedName("created_at")
|
|
* @JMS\Serializer\Annotation\VirtualProperty
|
|
*/
|
|
public function getCreatedAtRest()
|
|
{
|
|
return new DataRestContainer($this->getCreatedAt());
|
|
}
|
|
}
|