mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 06:44:33 +02:00
parent
bb0e1dc105
commit
26339b128a
@ -42,6 +42,13 @@ class Component extends AbstractWidget
|
|||||||
*/
|
*/
|
||||||
private $pane;
|
private $pane;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The disabled option is used to "delete" default dashlets provided by modules
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $disabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The template string used for rendering this widget
|
* The template string used for rendering this widget
|
||||||
*
|
*
|
||||||
@ -117,6 +124,26 @@ EOD;
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the disabled property
|
||||||
|
*
|
||||||
|
* @param boolean $disabled
|
||||||
|
*/
|
||||||
|
public function setDisabled($disabled)
|
||||||
|
{
|
||||||
|
$this->disabled = $disabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the disabled property
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function getDisabled()
|
||||||
|
{
|
||||||
|
return $this->disabled;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return this component's structure as array
|
* Return this component's structure as array
|
||||||
*
|
*
|
||||||
@ -136,6 +163,10 @@ EOD;
|
|||||||
*/
|
*/
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
if ($this->disabled === true) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
$view = $this->view();
|
$view = $this->view();
|
||||||
$url = clone($this->url);
|
$url = clone($this->url);
|
||||||
$url->setParam('view', 'compact');
|
$url->setParam('view', 'compact');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user