public function buildForm(FormBuilderInterface $builder, array $options)
{
$config = $this->config;
$files = array();
$finder = new Finder();
$finder->name('*.log')->depth('== 0');
foreach ($finder->in($config['root_dir'] . '/app/log/') as $file) {
$files[$file->getFilename()] = $file->getFilename();
}
$builder->add('files', 'choice', array('label' => 'ログファイル', 'choices' => $files, 'data' => 'site_' . date('Y-m-d') . '.log', 'expanded' => false, 'multiple' => false, 'constraints' => array(new Assert\NotBlank())))->add('line_max', 'text', array('label' => '表示行数', 'data' => '50', 'constraints' => array(new Assert\Type(array('type' => 'numeric', 'message' => 'form.type.numeric.invalid')), new Assert\NotBlank())));
}