<commit_before><?php

namespace Zeega\AdminBundle\AdminEntity;

use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\AdminBundle\Form\FormMapper;

class ItemAdmin extends Admin
{
    protected function configureFormFields(FormMapper $formMapper)
    {
		$itemTypes = array('Video' => 'Video', 'Audio' => 'Audio',
			'Text' => 'Text','Image' => 'Image','Tweet' => 'Tweet','Document' => 'Document',
			'Website' => 'Website');
        $fileLoc = realpath("lastExport.txt");
		$lastExport = file_get_contents($fileLoc);
        $formMapper
            ->add('title')
            ->add('description')
			->add('text')
			->add('uri')
			->add('attribution_uri')
			->add('media_type', 'choice', array('choices' => $itemTypes, 'multiple' => false))
			->add('media_geo_latitude')
			->add('media_geo_longitude')
			->add('location')
			->add('media_creator_username')
			->add('media_creator_realname')
			->add('tags', NULL, array('allow_add' => true, 'allow_delete' => true))
			->add('attributes', NULL, array('allow_add' => true, 'allow_delete' => true))
			->add('published', 'sonata_type_boolean')
            ->add('date_created', 'date', array('required' => false, 'widget' => 'single_text', 'help' => 'Last Export Date: ' . $lastExport . ' If created after this date, has not been sent to IA', 
                  'attr' => array('readonly' => true)))

        ;
    }

    protected function configureDatagridFilters(DatagridMapper $datagridMapper)
    {
        $datagridMapper
            ->add('title')
            ->add('uri')
			->add('published')
            ->add('media_type')
			->add('media_creator_username')
			->add('id')
        ;
    }

    protected function configureListFields(ListMapper $listMapper)
    {
        $listMapper
            ->addIdentifier('id')
            ->add('title')
            ->add('media_type')<commit_msg>boolean field not working<commit_after><?php

namespace Zeega\AdminBundle\AdminEntity;

use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\AdminBundle\Form\FormMapper;

class ItemAdmin extends Admin
{
    protected function configureFormFields(FormMapper $formMapper)
    {
		$itemTypes = array('Video' => 'Video', 'Audio' => 'Audio',
			'Text' => 'Text','Image' => 'Image','Tweet' => 'Tweet','Document' => 'Document',
			'Website' => 'Website');
        $fileLoc = realpath("lastExport.txt");
		$lastExport = file_get_contents($fileLoc);
        $formMapper
            ->add('title')
            ->add('description')
			->add('text')
			->add('uri')
			->add('attribution_uri')
			->add('media_type', 'choice', array('choices' => $itemTypes, 'multiple' => false))
			->add('media_geo_latitude')
			->add('media_geo_longitude')
			->add('location')
			->add('media_creator_username')
			->add('media_creator_realname')
			->add('tags', NULL, array('allow_add' => true, 'allow_delete' => true))
			->add('attributes', NULL, array('allow_add' => true, 'allow_delete' => true))
			->add('published', NULL, array('required' => false))
            ->add('date_created', 'date', array('required' => false, 'widget' => 'single_text', 'help' => 'Last Export Date: ' . $lastExport . ' If created after this date, has not been sent to IA', 
                  'attr' => array('readonly' => true)))

        ;
    }

    protected function configureDatagridFilters(DatagridMapper $datagridMapper)
    {
        $datagridMapper
            ->add('title')
            ->add('uri')
			->add('published')
            ->add('media_type')
			->add('media_creator_username')
			->add('id')
        ;
    }

    protected function configureListFields(ListMapper $listMapper)
    {
        $listMapper
            ->addIdentifier('id')
            ->add('title')
            ->add('media_type')
{'fraction_non_alphanumeric': 0.17446808510638298, 'fraction_numerical': 0.0, 'mean_word_length': 3.3482045701849836, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 88, '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': '4498', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1222, 'n_words': 228}