<?php
/**
 * Created by PhpStorm.
 * User: alex
 * Date: 13/05/16
 * Time: 15:38
 */

namespace AppBundle\Entity\Traits;

use Doctrine\ORM\Mapping as ORM;


trait LockableTrait
{
    /**
     * @var $lockable boolean
     * @Groups({"lockable"})
     */
    #[ORM\Column(type: 'boolean', options: ['default' => false])]
    private $lockable = false;

    /**
     * @return boolean
     */
    public function isLockable()
    {
        return $this->lockable;
    }

    /**
     * @param boolean $lockable
     * @return LockableTrait
     */
    public function setLockable($lockable)
    {
        $this->lockable = $lockable;
        return $this;
    }
    
    abstract public function applyLock();
    
    public function adminCanChange(){
        return true;
    }


}