The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ
blueroses.hu project repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
kekrozsak/src/KekRozsak/FrontBundle/Form/Type/ForumPostType.php

47 lines
928 B

<?php
namespace KekRozsak\FrontBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class ForumPostType extends AbstractType
{
private $topicGroup;
private $topic;
public function __construct($topicGroup = null, $topic = null)
{
$this->topicGroup = $topicGroup;
$this->topic = $topic;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('created_at', 'hidden', array(
'label' => 'Időpont',
'data' => new \DateTime('now')
));
$builder->add('text', null, array(
'label' => ' ',
));
$builder->add('topic', 'hidden', array(
'property_path' => false,
'data' => $this->topic,
));
}
public function getName()
{
return 'forum_post';
}
public function getDefaultOptions()
{
$opts = array(
'data_class' => 'KekRozsak\FrontBundle\Entity\ForumPost',
);
return $opts;
}
}