<commit_before><?php
/**
 * Litus is a project by a group of students from the KU Leuven. The goal is to create
 * various applications to support the IT needs of student unions.
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 *
 * @license http://litus.cc/LICENSE
 */

namespace CommonBundle\Form\Admin\Academic;

use CommonBundle\Component\Form\Admin\Element\Collection,
    CommonBundle\Component\Form\Admin\Element\Select,
    CommonBundle\Component\Form\Admin\Element\Text,
    CommonBundle\Component\Validator\Person\Barcode as BarcodeValidator,
    CommonBundle\Form\Admin\Address\AddPrimary as PrimaryAddressForm,
    CommonBundle\Form\Admin\Address\Add as AddressForm,
    CommonBundle\Entity\General\AcademicYear,
    CommonBundle\Entity\User\Person\Academic,
    CommonBundle\Entity\User\Status\Organization as OrganizationStatus,
    CommonBundle\Entity\User\Status\University as UniversityStatus,
    Doctrine\ORM\EntityManager,
    SecretaryBundle\Component\Validator\NoAt as NoAtValidator,
    Zend\Cache\Storage\StorageInterface as CacheStorage,
    Zend\InputFilter\InputFilter,
    Zend\InputFilter\Factory as InputFactory,
    Zend\Form\Element\Submit;

/**
 * Edit Academic
 *
 * @author <NAME> <<EMAIL>>
 */
class Edit extends \CommonBundle\Form\Admin\Person\Edit
{
    /**
     * @var \CommonBundle\Entity\User\Person The person we're going to modify
     */
    private $_person = null;

    /**
     * @param \Zend\Cache\Storage\StorageInterface $cache The cache instance
     * @param \Doctrine\ORM\EntityManager $entityManager The EntityManager instance
     * @param \CommonBundle\Entity\General\AcademicYear $academicYear The academic year
     * @param \CommonBundle\Entity\User\Person\Academic $person The person we're going to modify
     * @param null|string|int $name Optional name for the element
     */
    public function __construct(CacheStorage $cache, EntityManager $entityManager, AcademicYear $academicYear, Academic $person, $name = null)
    {
        parent::__construct($entityManager, $person, $name);

        $this->_person = $person;

        $field = new Text('birthday');
        $field->setLabel('Birthday')
            ->setAttribute('placeholder', 'dd/mm/yyyy');
        $this->add($field);

        $field = new PrimaryAddressForm($cache, $entityManager, 'primary_address', 'primary_address', true);
        $field->setLabel('Primary Address&mdash;Student Room or Home');
        $this->add($field);

        $field = new AddressForm('secondary_address', 'secondary_address', false);
        $field->setLabel('Secondary Address&mdash;Home');
        $this->add($field);

        $collection = new Collection('organization');
        $collection->setLabel('Organization');<commit_msg>Solved a bug that I introduced when testing the previous feature<commit_after><?php
/**
 * Litus is a project by a group of students from the KU Leuven. The goal is to create
 * various applications to support the IT needs of student unions.
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 *
 * @license http://litus.cc/LICENSE
 */

namespace CommonBundle\Form\Admin\Academic;

use CommonBundle\Component\Form\Admin\Element\Collection,
    CommonBundle\Component\Form\Admin\Element\Select,
    CommonBundle\Component\Form\Admin\Element\Text,
    CommonBundle\Component\Validator\Person\Barcode as BarcodeValidator,
    CommonBundle\Form\Admin\Address\AddPrimary as PrimaryAddressForm,
    CommonBundle\Form\Admin\Address\Add as AddressForm,
    CommonBundle\Entity\General\AcademicYear,
    CommonBundle\Entity\User\Person\Academic,
    CommonBundle\Entity\User\Status\Organization as OrganizationStatus,
    CommonBundle\Entity\User\Status\University as UniversityStatus,
    Doctrine\ORM\EntityManager,
    SecretaryBundle\Component\Validator\NoAt as NoAtValidator,
    Zend\Cache\Storage\StorageInterface as CacheStorage,
    Zend\InputFilter\InputFilter,
    Zend\InputFilter\Factory as InputFactory,
    Zend\Form\Element\Submit;

/**
 * Edit Academic
 *
 * @author <NAME> <<EMAIL>>
 */
class Edit extends \CommonBundle\Form\Admin\Person\Edit
{
    /**
     * @var \CommonBundle\Entity\User\Person The person we're going to modify
     */
    private $_person = null;

    /**
     * @param \Zend\Cache\Storage\StorageInterface $cache The cache instance
     * @param \Doctrine\ORM\EntityManager $entityManager The EntityManager instance
     * @param \CommonBundle\Entity\General\AcademicYear $academicYear The academic year
     * @param \CommonBundle\Entity\User\Person\Academic $person The person we're going to modify
     * @param null|string|int $name Optional name for the element
     */
    public function __construct(CacheStorage $cache, EntityManager $entityManager, AcademicYear $academicYear, Academic $person, $name = null)
    {
        parent::__construct($entityManager, $person, $name);

        $this->_person = $person;

        $field = new Text('birthday');
        $field->setLabel('Birthday')
            ->setAttribute('placeholder', 'dd/mm/yyyy');
        $this->add($field);

        $field = new PrimaryAddressForm($cache, $entityManager, 'primary_address', 'primary_address', false);
        $field->setLabel('Primary Address&mdash;Student Room or Home');
        $this->add($field);

        $field = new AddressForm('secondary_address', 'secondary_address', false);
        $field->setLabel('Secondary Address&mdash;Home');
        $this->add($field);

        $collection = new Collection('organization');
        $collection->setLabel('Organization');
{'fraction_non_alphanumeric': 0.12303390422929046, 'fraction_numerical': 0.0, 'mean_word_length': 3.8052057094878253, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 57, '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': '6606636', 'n_tokens_mistral': 1632, 'n_tokens_neox': 1597, 'n_words': 379}