GcBackend\Controller\IndexController::saveDashboardAction PHP Méthode

saveDashboardAction() public méthode

Save dashboard
public saveDashboardAction ( ) : Zend\View\Model\JsonModel
Résultat Zend\View\Model\JsonModel
    public function saveDashboardAction()
    {
        $coreConfig = $this->getServiceLocator()->get('CoreConfig');
        $params = $this->getRequest()->getPost()->toArray();
        $config = @unserialize($coreConfig->getValue('dashboard_widgets'));
        if (empty($config)) {
            $config = array();
        }
        if (!empty($params['dashboard'])) {
            $config['welcome'] = false;
        } else {
            $config['sortable'] = $params;
        }
        $coreConfig->setValue('dashboard_widgets', serialize($config));
        return $this->returnJson(array('success' => true));
    }