original_string: public function buildForm(FormBuilderInterface $builder, array $options)
      {
          global $kernel;
  
          // get all modules
          $modules = array();
  
          $dir = $kernel->getRootDir().'/../src/Terrific/Module/';
  
          $finder = new Finder();
          $finder->directories()->in($dir)->depth('== 0');
  
          foreach ($finder as $file) {
              $filename = $file->getFilename();
              $module = str_replace('Bundle', '', $filename);
              $modules[$module] = $module;
          }
  
          $builder->add('module', 'choice', array(
              'choices' => $modules,
              'multiple' => false,
              'label' => 'Skin for Module'
          ));
          $builder->add('name', 'text');
          $builder->add('style', 'choice', array(
              'choices' => array('css' => 'CSS', 'less' => 'LESS'),
              'multiple' => false,
              'expanded' => true
          ));
      }
code: public function buildForm(FormBuilderInterface $builder, array $options)
      {
          global $kernel;
  
          // get all modules
          $modules = array();
  
          $dir = $kernel->getRootDir().'/../src/Terrific/Module/';
  
          $finder = new Finder();
          $finder->directories()->in($dir)->depth('== 0');
  
          foreach ($finder as $file) {
              $filename = $file->getFilename();
              $module = str_replace('Bundle', '', $filename);
              $modules[$module] = $module;
          }
  
          $builder->add('module', 'choice', array(
              'choices' => $modules,
              'multiple' => false,
              'label' => 'Skin for Module'
          ));
          $builder->add('name', 'text');
          $builder->add('style', 'choice', array(
              'choices' => array('css' => 'CSS', 'less' => 'LESS'),
              'multiple' => false,
              'expanded' => true
          ));
      }
code_tokens: public function buildForm ( FormBuilderInterface $ builder , array $ options ) { global $ kernel ; // get all modules $ modules = array ( ) ; $ dir = $ kernel -> getRootDir ( ) . '/../src/Terrific/Module/' ; $ finder = new Finder ( ) ; $ finder -> directories ( ) -> in ( $ dir ) -> depth ( '== 0' ) ; foreach ( $ finder as $ file ) { $ filename = $ file -> getFilename ( ) ; $ module = str_replace ( 'Bundle' , '' , $ filename ) ; $ modules [ $ module ] = $ module ; } $ builder -> add ( 'module' , 'choice' , array ( 'choices' => $ modules , 'multiple' => false , 'label' => 'Skin for Module' ) ) ; $ builder -> add ( 'name' , 'text' ) ; $ builder -> add ( 'style' , 'choice' , array ( 'choices' => array ( 'css' => 'CSS' , 'less' => 'LESS' ) , 'multiple' => false , 'expanded' => true ) ) ; }
docstring: Builds the Skin form.
  
  @param \Symfony\Component\Form\FormBuilder $builder
  @param array $options
docstring_tokens: Builds the Skin form .