<?php

namespace AppBundle\Utils\Traits;

use Doctrine\ORM\Mapping as ORM;

trait ExtraJsonTrait
{

    /**
     * @var array
     *
     * @ORM\Column(name="extra", type="json_document", nullable=true)
     */
    private $extra;

    /***********************
     * Non-mapped field
     ***********************/
    private $twitter;
    private $linkedin;
    private $size;
    private $siren;

    private $titleTalent;
    private $situationTalent;
    private $descriptionTalent;


    /***********************
     * Custom Functions
     ***********************/


    public function initExtra()
    {
        $extra = $this->extra;
        isset($extra['twitter']) ? $this->twitter = $extra['twitter'] : null;
        isset($extra['linkedin']) ? $this->linkedin = $extra['linkedin'] : null;
        isset($extra['size']) ? $this->size = $extra['size'] : null;
        isset($extra['siren']) ? $this->siren = $extra['siren'] : null;
        isset($extra['titleTalent']) ? $this->titleTalent = $extra['titleTalent'] : null;
        isset($extra['situationTalent']) ? $this->situationTalent = $extra['situationTalent'] : null;
        isset($extra['descriptionTalent']) ? $this->descriptionTalent = $extra['descriptionTalent'] : null;
    }

    /***********************
     * Getters & Setters
     ***********************/

    /**
     * Set extra.
     */
    public function setExtra($extra = null)
    {
        $this->extra = $extra;
        return $this;
    }

    /**
     * Get extra.
     */
    public function getExtra()
    {
        return $this->extra;
    }

    public function setTwitter($twitter)
    {
        $this->twitter = $twitter;

        return $this;
    }

    public function getTwitter()
    {
        return $this->twitter;
    }

    public function setLinkedin($linkedin)
    {
        $this->linkedin = $linkedin;

        return $this;
    }

    public function getLinkedin()
    {
        return $this->linkedin;
    }

    public function setSize($size)
    {
        $this->size = $size;

        return $this;
    }

    public function getSize()
    {
        return $this->size;
    }

    public function setSiren($siren)
    {
        $this->siren = $siren;

        return $this;
    }

    public function getSiren()
    {
        return $this->siren;
    }

    public function setTitleTalent($titleTalent)
    {
        $this->titleTalent = $titleTalent;

        return $this;
    }

    public function getTitleTalent()
    {
        return $this->titleTalent;
    }

    public function setSituationTalent($situationTalent)
    {
        $this->situationTalent = $situationTalent;

        return $this;
    }

    public function getSituationTalent()
    {
        return $this->situationTalent;
    }


    public function setDescriptionTalent($descriptionTalent)
    {
        $this->descriptionTalent = $descriptionTalent;

        return $this;
    }

    public function getDescriptionTalent()
    {
        return $this->descriptionTalent;
    }
}