public function buildForm(FormBuilderInterface $builder, array $options) { $timezone = $this->user->getSymbbData()->getTimezone(); $builder->add('question', 'text', array("required" => false))->add('answers', "text", array("required" => false))->add('choices', "number", array("required" => false))->add('choicesChangeable', "checkbox", array("required" => false))->add('end', "datetime", array("required" => false, "input" => "timestamp", "view_timezone" => $timezone, "widget" => "single_text")); }
public function getSymbbData(\Symbb\Core\UserBundle\Entity\UserInterface $user) { if (!isset($this->symbbDataCache[$user->getId()])) { $this->symbbDataCache[$user->getId()] = $user->getSymbbData(); } return $this->symbbDataCache[$user->getId()]; }