<?php
/**
 * Created by IntelliJ IDEA.
 * User: rocho
 * Date: 2019.01.15.
 * Time: 8:29
 */

namespace common\modules\event\models;


use common\modules\event\EventModule;

/**
 * Class EventPermissions
 * @package common\modules\event\models
 *
 * @property boolean $allowCreate
 * @property boolean $allowDelete
 * @property boolean $allowEdit
 */
class EventPermissions
{
    public $allowCreate = false;
    public $allowDelete = false;
    public $allowEdit = false;

    public $allowIndexCreatedAt = false;


    public function __construct()
    {
        $moduleMode = EventModule::getInstance()->mode;
        if ( $moduleMode == 'backend'){
            $this->allowCreate = true;
            $this->allowDelete = true;
            $this->allowEdit = true;
            $this->allowIndexCreatedAt = true;
        }
    }

}