35 $analyticBoard = $this->getAnalyticBoardByKey($boardKey);
38 $this->
addError(
new Error(
'Analytic board with this key not exist'));
43 'pageTitle' => $analyticBoard->getTitle(),
44 'pageControlsParams' => $analyticBoard->getButtonsContent()
47 $analyticBoard->getDisplayComponentName(),
48 $analyticBoard->getDisplayComponentTemplate(),
49 $analyticBoard->getDisplayComponentParams(),
74 $analyticBoardProvider->addFilter(
'boardKey', $boardKey);
75 $analyticBoard = $analyticBoardProvider->execute()->getFirstResult();
78 $this->
addError(
new Error(
'Analytic board with this key does not exist'));
82 $dashboardForUser = Dashboard::loadByBoardKeyAndUserId($boardKey, $currentUser->
getId());
83 if ($dashboardForUser)
85 $dashboardForUser->delete();
88 $defaultDashboard = Dashboard::loadByBoardKeyAndUserId($boardKey, 0);
91 $defaultDashboard->delete();
94 if (!empty($analyticBoard))
96 $filter = $analyticBoard->getFilter();
99 $filterId = $filter->getFilterParameters()[
'FILTER_ID'];
101 $options =
new Options($filterId, $filter::getPresetsList());
102 $options->restore($filter::getPresetsList());
105 $analyticBoard->resetToDefault();;
108 $additionalParams = [
109 'pageTitle' => $analyticBoard->getTitle(),
110 'pageControlsParams' => $analyticBoard->getButtonsContent()
115 $analyticBoard->getDisplayComponentName(),
116 $analyticBoard->getDisplayComponentTemplate(),
117 $analyticBoard->getDisplayComponentParams(),
125 $analyticBoardProvider->addFilter(
'boardKey', $boardKey);
126 $analyticBoard = $analyticBoardProvider->execute()->getFirstResult();
129 $this->
addError(
new Error(
'Analytic board with this key does not exist'));
133 $analyticBoard->toggleOption($optionName);
135 AnalyticBoardManager::getInstance()->clearCache();
136 AnalyticBoardBatchManager::getInstance()->clearCache();
138 $analyticBoard = $analyticBoardProvider->execute()->getFirstResult();
140 $additionalParams = [
141 'pageTitle' => $analyticBoard->getTitle(),
142 'pageControlsParams' => $analyticBoard->getButtonsContent()
147 $analyticBoard->getDisplayComponentName(),
148 $analyticBoard->getDisplayComponentTemplate(),
149 $analyticBoard->getDisplayComponentParams(),