<?php
namespace Medienreaktor\Contact\Domain\Model;

use TYPO3\CMS\Core\Utility\GeneralUtility;

/***
 *
 * This file is part of the "Contact Persons" Extension for TYPO3 CMS.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 *
 *  (c) 2019 Daniel Kestler <info@medienreaktor.de>, medienreaktor GmbH
 *
 ***/
/**
 * Person
 */
class Person extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{

    /**
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\GeorgRinger\News\Domain\Model\Category>
     */
    #[\TYPO3\CMS\Extbase\Annotation\ORM\Lazy]
    protected $categories = null;

    /**
     * image
     *
     * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
     */
    #[\TYPO3\CMS\Extbase\Annotation\ORM\Cascade(['value' => 'remove'])]
    protected $image = null;

    /**
     * name
     *
     * @var string
     */
    #[\TYPO3\CMS\Extbase\Annotation\Validate(['validator' => 'NotEmpty'])]
    protected $name = '';

    /**
     * department
     * 
     * @var string
     */
    protected $department = '';

    /**
     * phone
     * 
     * @var string
     */
    protected $phone = '';

    /**
     * phoneAlt
     * 
     * @var string
     */
    protected $phoneAlt = '';

    /**
     * phoneMobile
     * 
     * @var string
     */
    protected $phoneMobile = '';

    /**
     * fax
     * 
     * @var string
     */
    protected $fax = '';

    /**
     * email
     * 
     * @var string
     */
    protected $email = '';

    /**
     * jurisdiction
     * 
     * @var string
     */
    protected $jurisdiction = '';

    /**
     * Returns the image
     *
     * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * Sets the image
     *
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
     * @return void
     */
    public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image): void
    {
        $this->image = $image;
    }

    /**
     * Returns the name
     * 
     * @return string $name
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Sets the name
     * 
     * @param string $name
     * @return void
     */
    public function setName($name): void
    {
        $this->name = $name;
    }

    /**
     * Returns the phone
     * 
     * @return string $phone
     */
    public function getPhone()
    {
        return $this->phone;
    }

    /**
     * Sets the phone
     * 
     * @param string $phone
     * @return void
     */
    public function setPhone($phone): void
    {
        $this->phone = $phone;
    }

    /**
     * Returns the phoneAlt
     * 
     * @return string $phoneAlt
     */
    public function getPhoneAlt()
    {
        return $this->phoneAlt;
    }

    /**
     * Sets the phoneAlt
     * 
     * @param string $phoneAlt
     * @return void
     */
    public function setPhoneAlt($phoneAlt): void
    {
        $this->phoneAlt = $phoneAlt;
    }

    /**
     * Returns the phoneMobile
     * 
     * @return string $phoneMobile
     */
    public function getPhoneMobile()
    {
        return $this->phoneMobile;
    }

    /**
     * Sets the phoneMobile
     * 
     * @param string $phoneMobile
     * @return void
     */
    public function setPhoneMobile($phoneMobile): void
    {
        $this->phoneMobile = $phoneMobile;
    }

    /**
     * Returns the email
     * 
     * @return string $email
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Sets the email
     * 
     * @param string $email
     * @return void
     */
    public function setEmail($email): void
    {
        $this->email = $email;
    }

    /**
     * Returns the jurisdiction
     * 
     * @return string $jurisdiction
     */
    public function getJurisdiction()
    {
        return $this->jurisdiction;
    }

    /**
     * Returns the jurisdiction
     * 
     * @return array $jurisdiction
     */
    public function getJurisdictionArray()
    {
        return GeneralUtility::trimExplode(PHP_EOL, $this->jurisdiction, true);
    }

    /**
     * Sets the jurisdiction
     * 
     * @param string $jurisdiction
     * @return void
     */
    public function setJurisdiction($jurisdiction): void
    {
        $this->jurisdiction = $jurisdiction;
    }

    /**
     * Returns the department
     * 
     * @return string $department
     */
    public function getDepartment()
    {
        return $this->department;
    }

    /**
     * Sets the department
     * 
     * @param string $department
     * @return void
     */
    public function setDepartment($department): void
    {
        $this->department = $department;
    }

    /**
     * Get categories
     * 
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\GeorgRinger\News\Domain\Model\Category>
     */
    public function getCategories()
    {
        return $this->categories;
    }

    /**
     * Set categories
     * 
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $categories
     */
    public function setCategories($categories): void
    {
        $this->categories = $categories;
    }

    /**
     * Returns the fax
     * 
     * @return string $fax
     */
    public function getFax()
    {
        return $this->fax;
    }

    /**
     * Sets the fax
     * 
     * @param string $fax
     * @return void
     */
    public function setFax($fax): void
    {
        $this->fax = $fax;
    }
}
