add event module
This commit is contained in:
42
common/modules/event/models/EventPermissions.php
Normal file
42
common/modules/event/models/EventPermissions.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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 == 'admin'){
|
||||
$this->allowCreate = true;
|
||||
$this->allowDelete = true;
|
||||
$this->allowEdit = true;
|
||||
$this->allowIndexCreatedAt = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user