<commit_before>[?php

/**
 * <?php echo $this->modelName ?> form base class.
 *
 * @method <?php echo $this->modelName ?> getObject() Returns the current form's model object
 *
 * @package    ##PROJECT_NAME##
 * @subpackage form
 * @author     ##AUTHOR_NAME##
 * @version    SVN: $Id$
 */
abstract class Base<?php echo $this->modelName ?>Form extends <?php echo $this->getFormClassToExtend() . "\n" ?>
{
  public function setup()
  {
    $this->setWidgets(array(
<?php foreach($this->getColumnAggregationKeyFields() as $column):?>
			'<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getNumberOfSpaces($column->getFieldName())) ?> => new sfWidgetFormChoice(array('choices' => <?php echo $this->arrayExport($this->getSubClassesChoices());?>)),
<?php endforeach;?>

<?php foreach ($this->getColumns(true, true) as $column): ?>
      '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getNumberOfSpaces($column->getFieldName())) ?> => new <?php echo $this->getWidgetClassForColumn($column) ?>(<?php echo $this->getWidgetOptionsForColumn($column) ?>),
<?php endforeach; ?>

<?php foreach ($this->getManyToManyRelations() as $relation): ?>
  <?php if ('DmMedia' === $relation->getClass()) continue; ?>
      '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getNumberOfSpaces($this->underscore($relation['alias']).'_list')) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'expanded' => true)),
<?php endforeach; ?>

<?php foreach($this->getOneToManyRelations() as $relation):?>
			'<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getNumberOfSpaces($this->underscore($relation['alias']).'_list')) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'expanded' => true)),
<?php endforeach;?>

<?php foreach($this->getOneToOneRelations() as $relation):?>
			'<?php echo $this->underscore($relation['local']) ?>'<?php echo str_repeat(' ', $this->getNumberOfSpaces($this->underscore($relation['local']))) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => false, 'model' => '<?php echo $relation['table']->getOption('name')?>', 'expanded' => false)),
<?php endforeach;?>

    ));

    $this->setValidators(array(
<?php foreach($this->getColumnAggregationKeyFields() as $column):?><commit_msg>adding condition to avoid echoing widgets for Translations in forms<commit_after>[?php

/**
 * <?php echo $this->modelName ?> form base class.
 *
 * @method <?php echo $this->modelName ?> getObject() Returns the current form's model object
 *
 * @package    ##PROJECT_NAME##
 * @subpackage form
 * @author     ##AUTHOR_NAME##
 * @version    SVN: $Id$
 */
abstract class Base<?php echo $this->modelName ?>Form extends <?php echo $this->getFormClassToExtend() . "\n" ?>
{
  public function setup()
  {
    $this->setWidgets(array(
<?php foreach($this->getColumnAggregationKeyFields() as $column):?>
			'<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getNumberOfSpaces($column->getFieldName())) ?> => new sfWidgetFormChoice(array('choices' => <?php echo $this->arrayExport($this->getSubClassesChoices());?>)),
<?php endforeach;?>

<?php foreach ($this->getColumns(true, true) as $column): ?>
      '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getNumberOfSpaces($column->getFieldName())) ?> => new <?php echo $this->getWidgetClassForColumn($column) ?>(<?php echo $this->getWidgetOptionsForColumn($column) ?>),
<?php endforeach; ?>

<?php foreach ($this->getManyToManyRelations() as $relation): ?>
  <?php if ('DmMedia' === $relation->getClass()) continue; ?>
      '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getNumberOfSpaces($this->underscore($relation['alias']).'_list')) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'expanded' => true)),
<?php endforeach; ?>

<?php foreach($this->getOneToManyRelations() as $relation):?>
			<?php if($relation['alias'] === 'Translation') continue;?>
			'<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getNumberOfSpaces($this->underscore($relation['alias']).'_list')) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'expanded' => true)),
<?php endforeach;?>

<?php foreach($this->getOneToOneRelations() as $relation):?>
			'<?php echo $this->underscore($relation['local']) ?>'<?php echo str_repeat(' ', $this->getNumberOfSpaces($this->underscore($relation['local']))) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => false, 'model' => '<?php echo $relation['table']->getOption('name')?>', 'expanded' => false)),
<?php endforeach;?>

    ));

    $this->setValidators(array(
<?php foreach($this->getColumnAggregationKeyFields() as $column):?>
{'fraction_non_alphanumeric': 0.22474348855564324, 'fraction_numerical': 0.0, 'mean_word_length': 6.798461538461538, 'pattern_counts': {'":': 0, '<': 68, '<?xml version=': 0, '>': 168, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2775131', 'n_tokens_mistral': 1589, 'n_tokens_neox': 1547, 'n_words': 330}