public function hookDashboardHandlers(array &$handlers)
    {
        $weight = count($handlers);
        $model = $this->getModel();
        $settings = $this->module->getSettings('ga_report');

        foreach ($model->getHandlers() as $id => $handler) {

            if (!in_array($id, $settings['dashboard'])) {
                continue;
            }

            $weight++;

            $report = $model->get($handler, $settings);

            $handlers["ga_$id"] = array(
                'status' => true,
                'weight' => $weight,
                'title' => $handler['name'],
                'template' => $handler['template'],
                'handlers' => array(
                    'data' => function () use ($handler, $report, $settings) {
                        return array(
                            'report' => $report,
                            'handler' => $handler,
                            'settings' => $settings
                        );
                    }
                )
            );
        }
    }
public function hookDashboardHandlers(array &$handlers)
    {
        $weight = count($handlers);
        $model = $this->getModel();
        $settings = $this->module->getSettings('ga_report');

        foreach ($model->getHandlers() as $id => $handler) {

            if (!in_array($id, $settings['dashboard'])) {
                continue;
            }

            $weight++;

            $report = $model->get($handler, $settings);

            $handlers["ga_$id"] = array(
                'status' => true,
                'weight' => $weight,
                'title' => $handler['name'],
                'template' => $handler['template'],
                'handlers' => array(
                    'data' => function () use ($handler, $report, $settings) {
                        return array(
                            'report' => $report,
                            'handler' => $handler,
                            'settings' => $settings
                        );
                    }
                )
            );
        }
    }
public function hookDashboardHandlers ( array & $ handlers ) { $ weight = count ( $ handlers ) ; $ model = $ this -> getModel ( ) ; $ settings = $ this -> module -> getSettings ( 'ga_report' ) ; foreach ( $ model -> getHandlers ( ) as $ id => $ handler ) { if ( ! in_array ( $ id , $ settings [ 'dashboard' ] ) ) { continue ; } $ weight ++ ; $ report = $ model -> get ( $ handler , $ settings ) ; $ handlers [ "ga_$id" ] = array ( 'status' => true , 'weight' => $ weight , 'title' => $ handler [ 'name' ] , 'template' => $ handler [ 'template' ] , 'handlers' => array ( 'data' => function ( ) use ( $ handler , $ report , $ settings ) { return array ( 'report' => $ report , 'handler' => $ handler , 'settings' => $ settings ) ; } ) ) ; } }
Implements hook "dashboard.handlers"
@param array $handlers
Implements hook dashboard . handlers