You can add CMS dashboard items to an individual site's CMS by adding a DashboardWidget class to the site's widgets folder and a CustomDashboard class to the site's config folder.
[path_to_site]/dashboardwidgets/[name].dashboardwidget.class.php [path_to_site]/config/customsidebarmenu.class.php
The dashboard class will be structured as follows
<php
class InvCustomDashboardWidgetExample extends InvDashboardWidget {
protected $title = 'Example';
protected $content = '';
protected $footer = '';
protected $priv = '';
public function getContent(){
// Generate and return your dashboard widget's HTML content here, for example...
return '<p>this is an example widget</p>';
}
public function getFooter(){
// Generate and return your dashboard widget's footer here, for example...
if(!$this->footer){
$this->footer = '<a class="btn btn-default" href="[URL]">Button</a>';
}
return $this->footer;
}
}
?>
The customsidebarmenu class will be structured as follows
<?php
Class CustomDashboard {
public function updateDashboard($dashboard){
$dashboard->addDashboardWidget('example' , InvDashboardWidget::getCustomWidget('example') , $after=null , $before='documents');
}
}
?>