PHP code example of raffaelj / cockpit-dashboardgrid
1. Go to this page and download the library: Download raffaelj/cockpit-dashboardgrid library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
raffaelj / cockpit-dashboardgrid example snippets
$app->on('admin.init', function() {
if (isset($this['modules']['dashboardgrid'])) {
$this->on('admin.dashboardgrid.widgets.top', function($areas) {
$area = 'my-custom-area';
$this->renderView('path/to/custom/dashboard_area.php', compact('areas', 'area'));
}, 90); // priority < 100: above, > 100: below addon top area with prio 100
}
});