parent
bb0e1dc105
commit
26339b128a
|
@ -42,6 +42,13 @@ class Component extends AbstractWidget
|
|||
*/
|
||||
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
|
||||
*
|
||||
|
@ -117,6 +124,26 @@ EOD;
|
|||
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
|
||||
*
|
||||
|
@ -136,6 +163,10 @@ EOD;
|
|||
*/
|
||||
public function render()
|
||||
{
|
||||
if ($this->disabled === true) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$view = $this->view();
|
||||
$url = clone($this->url);
|
||||
$url->setParam('view', 'compact');
|
||||
|
|
Loading…
Reference in New Issue