<commit_before><?php

namespace Bellwether\BWCMSBundle\Classes\Preference\Type;

use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Form\Form;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormBuilder;
use Bellwether\BWCMSBundle\Classes\Preference\PreferenceType;
use Bellwether\BWCMSBundle\Classes\Constants\PreferenceFieldType;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Length;
use Bellwether\BWCMSBundle\Classes\Preference\Form\SampleForm;

class GeneralType Extends PreferenceType
{

    function __construct(ContainerInterface $container = null, RequestStack $request_stack = null)
    {
        $this->setContainer($container);
        $this->setRequestStack($request_stack);
    }

    protected function buildFields()
    {
        $this->addField('title', PreferenceFieldType::String);
        $this->addField('description', PreferenceFieldType::String);
        $this->addField('keywords', PreferenceFieldType::String);
        $this->addField('brandLogo', PreferenceFieldType::Content);
        $this->addField('adminEmail', PreferenceFieldType::String, true);
    }

    protected function buildForm()
    {
        $this->fb()->add('title', 'text',
            array(
                'label' => 'Title'
            )
        );
        $this->fb()->add('description', 'text',
            array(
                'label' => 'Description'
            )
        );
        $this->fb()->add('keywords', 'text',
            array(
                'label' => 'Keywords'
            )
        );
        $this->fb()->add('brandLogo', 'bwcms_content',
            array(<commit_msg>Added direction support in preference<commit_after><?php

namespace Bellwether\BWCMSBundle\Classes\Preference\Type;

use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Form\Form;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormBuilder;
use Bellwether\BWCMSBundle\Classes\Preference\PreferenceType;
use Bellwether\BWCMSBundle\Classes\Constants\PreferenceFieldType;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Length;
use Bellwether\BWCMSBundle\Classes\Preference\Form\SampleForm;

class GeneralType Extends PreferenceType
{

    function __construct(ContainerInterface $container = null, RequestStack $request_stack = null)
    {
        $this->setContainer($container);
        $this->setRequestStack($request_stack);
    }

    protected function buildFields()
    {
        $this->addField('title', PreferenceFieldType::String);
        $this->addField('description', PreferenceFieldType::String);
        $this->addField('keywords', PreferenceFieldType::String);
        $this->addField('brandLogo', PreferenceFieldType::Content);
        $this->addField('adminEmail', PreferenceFieldType::String, true);
    }

    protected function buildForm()
    {
        $this->fb()->add('title', 'text',
            array(
                'label' => 'Title',
                'attr' => array(
                    'dir' => $this->sm()->getAdminCurrentSite()->getDirection()
                )
            )
        );
        $this->fb()->add('description', 'text',
            array(
                'label' => 'Description',
                'attr' => array(
                    'dir' => $this->sm()->getAdminCurrentSite()->getDirection()
                )
            )
        );
        $this->fb()->add('keywords', 'text',
            array(
                'label' => 'Keywords',
                'attr' => array(
                    'dir' => $this->sm()->getAdminCurrentSite()->getDirection()
                )
            )
        );
        $this->fb()->add('brandLogo', 'bwcms_content',
            array(
{'fraction_non_alphanumeric': 0.1360613810741688, 'fraction_numerical': 0.0, 'mean_word_length': 2.764196342637151, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 54, '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': '6889621', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1055, 'n_words': 157}