Admin_PortalController::updatePortletConfigAction PHP Метод

updatePortletConfigAction() публичный Метод

    public function updatePortletConfigAction()
    {
        $key = $this->getParam("key");
        $id = $this->getParam("id");
        $configuration = $this->getParam("config");
        $dashboard = $this->dashboardHelper->getDashboard($key);
        foreach ($dashboard["positions"] as &$col) {
            foreach ($col as &$portlet) {
                if ($portlet['id'] == $id) {
                    $portlet['config'] = $configuration;
                    break;
                }
            }
        }
        $this->dashboardHelper->saveDashboard($key, $dashboard);
        $this->_helper->json(["success" => true]);
    }