Fixed Formatting and added docblock
This commit is contained in:
parent
0bd12cf0e6
commit
a7d20211ae
|
|
@ -223,9 +223,11 @@ class WidgetManager
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes a single report widget item
|
||||
* Remove a registered ReportWidget.
|
||||
* @param string $className Widget class name.
|
||||
* @return void
|
||||
*/
|
||||
public function removeReportWidgetItem($className)
|
||||
public function removeReportWidget($className)
|
||||
{
|
||||
if (!$this->reportWidgets) {
|
||||
throw new SystemException('Unable to remove a widget before widgets are loaded.');
|
||||
|
|
@ -234,4 +236,4 @@ class WidgetManager
|
|||
unset($this->reportWidgets[$className]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class WidgetManagerTest extends TestCase
|
|||
'context' => 'dashboard'
|
||||
]);
|
||||
|
||||
$manager->removeReportWidgetItem('Acme\Fake\ReportWidget\ByeWorld');
|
||||
$manager->removeReportWidget('Acme\Fake\ReportWidget\ByeWorld');
|
||||
|
||||
$widgets = $manager->listReportWidgets();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue