<commit_before><?php
/**
 * Form toolkit class for the theme plugin
 * 
 * @package     sfSympalThemePlugin
 * @subpackage  util
 * @author      <NAME> <<EMAIL>>
 * @author      <NAME> <<EMAIL>>
 */

class sfSympalThemeFormToolkit
{
  
  /**
   * Get the theme and widget validator
   *
   * @return array $widgetAndValidator
   */
  public function getThemeWidgetAndValidator()
  {
    $themes = sfSympalContext::getInstance()->getService('theme_manager')->getAvailableThemes();
    $options = array('' => '');
    foreach ($themes as $name => $theme)
    {
      $options[$name] = sfInflector::humanize($name);
    }
    $widget = new sfWidgetFormChoice(array(
      'choices'   => $options
    ));
    $validator = new sfValidatorChoice(array(
      'choices'   => array_keys($options),
      'required' => false
    ));

    return array('widget' => $widget, 'validator' => $validator);
  }
}<commit_msg>Small changes to form toolkit, including removing "sympal".<commit_after><?php
/**
 * Form toolkit class for the theme plugin
 * 
 * @package     sfThemePlugin
 * @subpackage  util
 * @author      <NAME> <<EMAIL>>
 * @author      <NAME> <<EMAIL>>
 */

class sfThemeFormToolkit
{
  
  /**
   * Builds and returns an array with the widget and validator to use with
   * any choice field for a theme
   *
   * @return array $widgetAndValidator
   */
  public function getThemeWidgetAndValidator()
  {
    $themes = sfApplicationConfiguration::getActive()
      ->getPluginConfiguration('sfThemePlugin')
      ->getThemeManager()
      ->getAvailableThemes();

    $options = array('' => '');
    foreach ($themes as $name => $theme)
    {
      $options[$name] = sfInflector::humanize($name);
    }
    $widget = new sfWidgetFormChoice(array(
      'choices'   => $options
    ));
    $validator = new sfValidatorChoice(array(
      'choices'   => array_keys($options),
      'required' => false
    ));

    return array('widget' => $widget, 'validator' => $validator);
  }
}
{'fraction_non_alphanumeric': 0.1468955073195356, 'fraction_numerical': 0.0, 'mean_word_length': 3.137787056367432, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 34, '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': '5440379', 'n_tokens_mistral': 603, 'n_tokens_neox': 602, 'n_words': 143}