Spaces:
Sleeping
Sleeping
File size: 1,440 Bytes
07c3cdd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | <?php
namespace ProcessMaker\Plugins\Interfaces;
use ProcessMaker\Plugins\Traits\Attributes;
/**
* Class ToolbarDetail
* @package ProcessMaker\Plugins\Interfaces
*/
class ToolbarDetail
{
use Attributes;
private $Namespace;
private $ToolbarId;
private $Filename;
/**
* This function is the constructor of the ToolbarDetail class
* @param string $Namespace Name of Plugin
* @param string $ToolbarId (NORMAL, GRID)
* @param string $Filename
*/
public function __construct($Namespace, $ToolbarId, $Filename)
{
$this->Namespace = $Namespace;
$this->ToolbarId = $ToolbarId;
$this->Filename = $Filename;
}
/**
* Check if name of plugin is equal to params
* @param string $Namespace
* @return bool
*/
public function equalNamespaceTo($Namespace)
{
return $Namespace == $this->Namespace;
}
/**
* Check if toolbar id is equal to params
* @param string $ToolbarId
* @return bool
*/
public function equalToolbarIdTo($ToolbarId)
{
return $ToolbarId == $this->ToolbarId;
}
/**
* Check if file exists to params
* @return bool
*/
public function exitsFile()
{
return file_exists($this->Filename);
}
/**
* Include file
* @return bool
*/
public function includeFile()
{
include($this->Filename);
}
}
|