diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4d83b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.php_cs.cache diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..b13755c --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,77 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'array_syntax' => [ + 'syntax' => 'short', + ], + 'binary_operator_spaces' => true, + 'concat_space' => [ + 'spacing' => 'one', + ], + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'linebreak_after_opening_tag' => true, + 'lowercase_cast' => true, + 'method_separation' => true, + 'native_function_casing' => true, + 'new_with_braces' => true, + 'no_alias_functions' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_blank_lines_before_namespace' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_consecutive_blank_lines' => [ + 'continue', + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + ], + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_short_bool_cast' => true, + 'no_singleline_whitespace_before_semicolons' => true, + 'no_trailing_comma_in_list_call' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unneeded_control_parentheses' => [ + 'break', + 'clone', + 'continue', + 'echo_print', + 'return', + 'switch_case', + ], + 'no_unreachable_default_argument_value' => true, + 'no_unused_imports' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'normalize_index_brace' => true, + 'ordered_imports' => true, + 'phpdoc_add_missing_param_annotation' => true, + 'phpdoc_no_package' => true, + 'phpdoc_order' => true, + 'phpdoc_scalar' => true, + 'phpdoc_types' => true, + 'self_accessor' => true, + 'short_scalar_cast' => true, + 'single_quote' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'whitespace_after_comma_in_array' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__) + ->exclude('Resources') + ->notName('ext_emconf.php') + ); diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 0000000..5573af3 --- /dev/null +++ b/.styleci.yml @@ -0,0 +1,59 @@ +preset: psr2 + +enabled: + - alpha_ordered_imports + - binary_operator_spaces + - concat_with_spaces + - function_typehint_space + - hash_to_slash_comment + - linebreak_after_opening_tag + - lowercase_cast + - method_separation + - native_function_casing + - new_with_braces + - no_alias_functions + - no_blank_lines_after_class_opening + - no_blank_lines_after_phpdoc + - no_blank_lines_before_namespace + - no_empty_comment + - no_empty_phpdoc + - no_empty_statement + - no_extra_block_blank_lines + - no_extra_consecutive_blank_lines + - no_leading_import_slash + - no_leading_namespace_whitespace + - no_multiline_whitespace_around_double_arrow + - no_multiline_whitespace_before_semicolons + - no_short_bool_cast + - no_singleline_whitespace_before_semicolons + - no_trailing_comma_in_list_call + - no_trailing_comma_in_singleline_array + - no_unneeded_control_parentheses + - no_unreachable_default_argument_value + - no_unused_imports + - no_useless_else + - no_useless_return + - no_whitespace_before_comma_in_array + - no_whitespace_in_blank_line + - normalize_index_brace + - phpdoc_add_missing_param_annotation + - phpdoc_no_package + - phpdoc_order + - phpdoc_scalar + - phpdoc_types + - self_accessor + - short_array_syntax + - short_scalar_cast + - single_quote + - standardize_not_equals + - ternary_operator_spaces + - trailing_comma_in_multiline_array + - whitespace_after_comma_in_array + +finder: + name: + - "*.php" + exclude: + - "Resources" + not-name: + - "ext_emconf.php" diff --git a/Classes/Controller/DashboardController.php b/Classes/Controller/DashboardController.php index 0ae90d0..b1cd231 100644 --- a/Classes/Controller/DashboardController.php +++ b/Classes/Controller/DashboardController.php @@ -1,5 +1,5 @@ backendUserAuthentication = $backendUserAuthentication ?: $GLOBALS['BE_USER']; + } /** * Initialize action */ public function initializeAction() { + $dashboardSettings = $this->objectManager + ->get(ConfigurationManagerInterface::class) + ->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'dashboard', 'dashboardmod1'); + + $userTsConfigSettings = GeneralUtility::removeDotsFromTS((array)$this->backendUserAuthentication->getTSConfigProp('tx_dashboard.settings')); + $this->dashboardSettings = array_replace($dashboardSettings, $userTsConfigSettings); $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings'); - $querySettings->setRespectStoragePage(false); + if (empty($this->dashboardSettings['persistence']['storagePid']) || strpos($this->dashboardSettings['persistence']['storagePid'], ',') !== false) { + throw new \UnexpectedValueException('tx_dashboard.persistence.storagePid must be set in Dashboard settings or user tsconfig and must be a single page id', 1511102864); + } + $querySettings->setStoragePageIds([$this->dashboardSettings['persistence']['storagePid']]); $this->dashboardRepository->setDefaultQuerySettings($querySettings); - $configurationManager = GeneralUtility::makeInstance(ObjectManager::class) - ->get(ConfigurationManagerInterface::class); - $this->dashboardSettings = $configurationManager - ->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'dashboard', 'dashboardmod1'); - + $dashBoardUid = null; if ($this->request->hasArgument('id')) { - $this->dashboard = $this->dashboardRepository->findByUid($this->request->getArgument('id')); - if ($this->dashboard->getBeUser()->getuid() != $this->getBackendUser()->user['uid']) { - throw new \Exception("Access denied to selected dashboard", 1); + $dashBoardUid = (int)$this->request->getArgument('id'); + } + if ($dashBoardUid) { + $this->dashboard = $this->dashboardRepository->findByUid($dashBoardUid); + if ($this->dashboard->getBeUser()->getUid() !== (int)$this->backendUserAuthentication->user['uid']) { + throw new \Exception('Access denied to selected dashboard', 1); } } else { - $this->dashboard = $this->dashboardRepository->findByBeuser($this->getBackendUser()->user['uid'])->getFirst(); - }; + $this->dashboard = $this->dashboardRepository->findOneByBeuser($this->backendUserAuthentication->user['uid']); + } } /** @@ -151,29 +170,29 @@ public function indexAction() $this->view->assign('dashboard', $this->dashboard); } + public function initializeChangeAction() + { + $configuration = $this->arguments->getArgument('items') + ->getPropertyMappingConfiguration(); + + $configuration->allowAllProperties(); + $configuration->forProperty('*')->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, true); + $configuration->forProperty('*.*')->allowAllProperties(); + } + /** * action change * + * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Pixelant\Dashboard\Domain\Model\Widget> $items * @return string */ - public function changeAction() + public function changeAction($items) { - $getVars = $this->request->getArguments(); - $items = $getVars['items']; - if (!empty($items) && is_array($items)) { - foreach ($items as $index => $item) { - $widget = $this->dashboardWidgetSettingsRepository->findByUid($item['uid']); - $widget->setX($item['x']); - $widget->setY($item['y']); - $widget->setWidth($item['width']); - $widget->setHeight($item['height']); - $this->dashboardWidgetSettingsRepository->update($widget); - } - $this->objectManager - ->get(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class) - ->persistAll(); + foreach ($items as $widget) { + $this->dashboard->updateWidget($widget); } - return 'sent string was: ' . print_r($getVars['items'], true); + $this->dashboardRepository->update($this->dashboard); + return 'Updated widget positions'; } /** @@ -184,19 +203,19 @@ public function changeAction() public function createWidgetAction() { $getVars = $this->request->getArguments(); - if (is_object($this->dashboard)) { + if ($this->dashboard) { $storagePid = $this->dashboardSettings['persistence']['storagePid']; $widgetType = $getVars['widgetType']; $widgetSettings = $this->getWidgetSettings($widgetType); - $width = (isset($widgetSettings['defaultWidth'])) ? $widgetSettings['defaultWidth'] : 3; - $height = (isset($widgetSettings['defaultHeight'])) ? $widgetSettings['defaultHeight'] : 5; - $overrideVals = '&overrideVals[tx_dashboard_domain_model_dashboardwidgetsettings][dashboard]=' . $this->dashboard->getUid(); - $overrideVals .= '&overrideVals[tx_dashboard_domain_model_dashboardwidgetsettings][widget_identifier]=' . $getVars['widgetType']; - $overrideVals .= '&overrideVals[tx_dashboard_domain_model_dashboardwidgetsettings][width]=' . $width; - $overrideVals .= '&overrideVals[tx_dashboard_domain_model_dashboardwidgetsettings][height]=' . $height; - $overrideVals .= '&overrideVals[tx_dashboard_domain_model_dashboardwidgetsettings][y]=' . $this->getNextRow($this->dashboard->getUid()); - $overrideVals .= '&overrideVals[tx_dashboard_domain_model_dashboardwidgetsettings][x]=0'; - $params = '&edit[tx_dashboard_domain_model_dashboardwidgetsettings][' . $storagePid . ']=new' . $overrideVals; + $width = $widgetSettings['defaultWidth'] ?? 3; + $height = $widgetSettings['defaultHeight'] ?? 5; + $overrideVals = '&overrideVals[tx_dashboard_domain_model_widget][dashboard]=' . $this->dashboard->getUid(); + $overrideVals .= '&overrideVals[tx_dashboard_domain_model_widget][widget_identifier]=' . $getVars['widgetType']; + $overrideVals .= '&overrideVals[tx_dashboard_domain_model_widget][width]=' . $width; + $overrideVals .= '&overrideVals[tx_dashboard_domain_model_widget][height]=' . $height; + $overrideVals .= '&overrideVals[tx_dashboard_domain_model_widget][y]=' . $this->dashboard->findNextAvailableWidgetPosition(); + $overrideVals .= '&overrideVals[tx_dashboard_domain_model_widget][x]=0'; + $params = '&edit[tx_dashboard_domain_model_widget][' . $storagePid . ']=new' . $overrideVals; $returnUrl = urlencode($this->controllerContext->getUriBuilder()->uriFor('index', ['id' => $this->dashboard->getUid()])); return BackendUtility::getModuleUrl('record_edit') . $params . '&returnUrl=' . $returnUrl; @@ -213,51 +232,48 @@ public function createAction() { $getVars = $this->request->getArguments(); - if (isset($GLOBALS['BE_USER']->user['uid'])) { - $beUserUid = (int)$GLOBALS['BE_USER']->user['uid']; + if (isset($this->backendUserAuthentication->user['uid'])) { + $beUserUid = (int)$this->backendUserAuthentication->user['uid']; $beUserRepository = $this->objectManager->get( \TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository::class ); $beUser = $beUserRepository->findByUid($beUserUid); if ($beUser !== null) { - $newDashboard = $this->objectManager->get(\TYPO3\CMS\Dashboard\Domain\Model\Dashboard::class); + $newDashboard = $this->objectManager->get(\Pixelant\Dashboard\Domain\Model\Dashboard::class); $newDashboard->setTitle($getVars['dashboardName']); + $newDashboard->setPid($this->dashboardSettings['persistence']['storagePid']); $newDashboard->setBeuser($beUser); $this->dashboardRepository->add($newDashboard); - $this->objectManager - ->get(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class) - ->persistAll(); + // We need to call persistAll here to get the uid of the just created dashboard + $this->objectManager->get(PersistenceManagerInterface::class)->persistAll(); + return $this->controllerContext->getUriBuilder()->uriFor('index', ['id' => $newDashboard->getUid()]); } - // return 'Would create dashboard with name: ' . $getVars['dashboardName']; - return $this->controllerContext->getUriBuilder()->uriFor('index', ['id' => $newDashboard->getUid()]); } - return false; //$this->controllerContext->getUriBuilder()->uriFor('index'); + return false; } /** * action renderWidget * + * @param int $widgetId * @return string */ - public function renderWidgetAction() + public function renderWidgetAction(int $widgetId) { - $content = ''; - $getVars = $this->request->getArguments(); - $widgetId = $getVars['widgetId']; $errorTitle = $this ->getLanguageService() ->sL('LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:error.title'); - + $content = ''; if (!empty($widgetId) && (int)$widgetId > 0) { - $widget = $this->dashboardWidgetSettingsRepository->findByUid($widgetId); + $widget = $this->dashboard->getWidgetById($widgetId); if ($widget) { - $widgetConfiguration = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dashboard']['widgets'][$widget->getWidgetIdentifier()]; - $widgetClassName = $widgetConfiguration['class']; - if (class_exists($widgetClassName)) { - $widgetClass = $this->objectManager->get($widgetClassName); + $widgetSettings = $widget->getSettings(); + $widgetControllerClassName = $widgetSettings['class']; + if (class_exists($widgetControllerClassName)) { + $widgetController = $this->objectManager->get($widgetControllerClassName); try { - return $widgetClass->render($widget); + return $widgetController->render($widget); } catch (\Exception $e) { $localizedError = $this ->getLanguageService() @@ -268,10 +284,10 @@ public function renderWidgetAction() $content = $this->getHtmlErrorMessage($errorTitle, $localizedError); } } else { - $content = $this->getHtmlErrorMessage($errorTitle, 'Class : ' . $widgetClassName .' could not be found!'); + $content = $this->getHtmlErrorMessage($errorTitle, 'Class : ' . $widgetControllerClassName . ' could not be found!'); } } else { - $content = $this->getHtmlErrorMessage($errorTitle, 'Widget [' . $widgetId .'] could not be found!'); + $content = $this->getHtmlErrorMessage($errorTitle, 'Widget [' . $widgetId . '] could not be found!'); } } return $content; @@ -285,15 +301,17 @@ public function renderWidgetAction() protected function registerDocheaderMenu() { // Dashboards - $dashboards = $this->dashboardRepository->findByBeuser((int)$GLOBALS['BE_USER']->user['uid']); + $dashboards = $this->dashboardRepository->findByBeuser((int)$this->backendUserAuthentication->user['uid']); if (!empty($dashboards)) { $dashboardMenu = $this->view->getModuleTemplate()->getDocHeaderComponent()->getMenuRegistry()->makeMenu(); - $dashboardMenu->setIdentifier('_dsahboardSelector'); + $dashboardMenu->setIdentifier('_dashboardSelector'); + $uriBuilder = $this->controllerContext->getUriBuilder(); foreach ($dashboards as $index => $dashboard) { + $uriBuilder->reset(); $menuItem = $dashboardMenu->makeMenuItem() ->setTitle($dashboard->getTitle()) ->setHref( - $this->controllerContext->getUriBuilder()->uriFor('index', ['id' => $dashboard->getUid()]) + $uriBuilder->uriFor('index', ['id' => $dashboard->getUid()]) ); if ($dashboard->getUid() === $this->dashboard->getUid()) { $menuItem->setActive(true); @@ -313,7 +331,6 @@ protected function registerDocheaderButtons() { /** @var ButtonBar $buttonBar */ $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar(); - $getVars = $this->request->getArguments(); // New dashboard button $newDashboardButton = $buttonBar->makeLinkButton() @@ -338,8 +355,8 @@ protected function registerDocheaderButtons() $newWidgetButton = $buttonBar->makeLinkButton() ->setDataAttributes( [ - 'identifier' => 'newDashboardWidgetSetting', - 'dashboardid' => $this->dashboard->getUid() + 'identifier' => 'newWidget', + 'dashboardid' => $this->dashboard->getUid(), ] ) ->setHref('#') @@ -363,31 +380,30 @@ protected function registerDocheaderButtons() * Returns the json encoded data which is used by the dashboard * JavaScript app. * - * @return string + * @return array */ - protected function getDashboardAppInitialData(): string + protected function getDashboardAppInitialData(): array { + $uriBuilder = $this->controllerContext->getUriBuilder(); + $uriBuilder->reset(); + $uriArguments = $this->dashboard ? ['id' => $this->dashboard->getUid()] : []; $dashboardAppInitialData = [ 'selectableWidgetTypesConfiguration' => $this->getSelectableWidgets(), 'endpoints' => [ - 'create' => $this->controllerContext->getUriBuilder()->uriFor('create'), - 'createWidget' => $this->controllerContext->getUriBuilder()->uriFor('createWidget'), - 'change' => $this->controllerContext->getUriBuilder()->uriFor('change'), - 'index' => $this->controllerContext->getUriBuilder()->uriFor('index'), - 'renderWidget' => $this->controllerContext->getUriBuilder()->uriFor('renderWidget'), + 'create' => $uriBuilder->uriFor('create'), + 'createWidget' => $uriBuilder->uriFor('createWidget', $uriArguments), + 'change' => $uriBuilder->uriFor('change', $uriArguments), + 'index' => $uriBuilder->uriFor('index', $uriArguments), + 'renderWidget' => $uriBuilder->uriFor('renderWidget', $uriArguments), 'editDashboard' => $this->getEditDashboardEndpoint(), ], ]; - if (is_object($this->dashboard)) { + if ($this->dashboard) { $dashboardAppInitialData['dashboard'] = [ 'id' => $this->dashboard->getUid(), 'title' => $this->dashboard->getTitle(), ]; - $dashboardAppInitialData['endpoints']['index'] = - $this->controllerContext->getUriBuilder()->uriFor( - 'index', ['id' => $this->dashboard->getUid()] - ); } $dashboardAppInitialData = ArrayUtility::reIndexNumericArrayKeysRecursive($dashboardAppInitialData); @@ -396,7 +412,7 @@ protected function getDashboardAppInitialData(): string $this->dashboardSettings['settings']['translationFile'] ); - return json_encode($dashboardAppInitialData); + return $dashboardAppInitialData; } /** @@ -406,7 +422,7 @@ protected function getDashboardAppInitialData(): string */ protected function getSelectableWidgets(): array { - $items = $GLOBALS['TCA']['tx_dashboard_domain_model_dashboardwidgetsettings']['columns']['widget_identifier']['config']['items']; + $items = $GLOBALS['TCA']['tx_dashboard_domain_model_widget']['columns']['widget_identifier']['config']['items']; unset($items['0']); if (!empty($items) && is_array($items)) { foreach ($items as $index => $values) { @@ -419,52 +435,14 @@ protected function getSelectableWidgets(): array /** * Returns array of item configured for widget_identifier * - * @param string widgetIdentifier + * @param string $widgetIdentifier * * @return array */ protected function getWidgetSettings(string $widgetIdentifier): array { - $widgetSettings = []; - - $selectableWidgets = $this->getSelectableWidgets(); - if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dashboard']['widgets'][$widgetIdentifier])) { - $widgetSettings = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dashboard']['widgets'][$widgetIdentifier]; - } - return $widgetSettings; - } - - /** - * Returns next available "row" - * - * @param integer $dasboardId - * - * @return integer - */ - protected function getNextRow(int $dasboardId): int - { - $retval = 0; - - /** @var QueryBuilder $queryBuilder */ - $queryBuilder = - GeneralUtility::makeInstance( - \TYPO3\CMS\Core\Database\ConnectionPool::class - )->getQueryBuilderForTable('tx_dashboard_domain_model_dashboardwidgetsettings'); - - $result = $queryBuilder - ->select('y', 'height') - ->from('tx_dashboard_domain_model_dashboardwidgetsettings') - ->where($queryBuilder->expr()->eq('dashboard', $dasboardId)) - ->andWhere($queryBuilder->expr()->eq('deleted', 0)) - ->orderBy('y', 'DESC') - ->addOrderBy('height', 'DESC') - ->execute() - ->fetch(); - - if ($result) { - $retval = $result['y'] + $result['height']; - } - return $retval; + $widget = new Widget($widgetIdentifier); + return $widget->getSettings(); } /** @@ -475,7 +453,7 @@ protected function getNextRow(int $dasboardId): int protected function getEditDashboardEndpoint() { $editDashboardEndpoint = ''; - if (is_object($this->dashboard)) { + if ($this->dashboard) { $params = '&edit[tx_dashboard_domain_model_dashboard][' . $this->dashboard->getUid() . ']=edit'; $returnUrl = urlencode($this->controllerContext->getUriBuilder()->uriFor('index', ['id' => $this->dashboard->getUid()])); $editDashboardEndpoint = BackendUtility::getModuleUrl('record_edit') . $params . '&returnUrl=' . $returnUrl; @@ -532,8 +510,8 @@ protected function getHtmlErrorMessage($title, $message) $content .= ' '; $content .= ' '; $content .= '
- *
- *
- *
- */
class DashboardWidgetViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper
{
-
- /**
- * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
- * @inject
- */
- protected $configurationManager;
-
/**
* Renders a record list as known from the TYPO3 list module
* Note: This feature is experimental!
*
- * @param \TYPO3\CMS\Dashboard\Domain\Model\DashboardWidgetSettings $dashboardWidgetSetting
+ * @param \Pixelant\Dashboard\Domain\Model\Widget $widget
* @return string the rendered content
* @see \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList
*/
- public function render($dashboardWidgetSetting)
+ public function render($widget)
{
- $pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess(
- \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'),
- $GLOBALS['BE_USER']->getPagePermsClause(1)
- );
- $widget = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dashboard']['widgets'][$dashboardWidgetSetting->getWidgetIdentifier()];
- $widgetClassName = $widget['class'];
+ $widgetSettings = $widget->getSettings();
+ $widgetClassName = $widgetSettings['class'];
if (class_exists($widgetClassName)) {
- $widgetClass = $this->objectManager->get($widgetClassName);
- return $widgetClass->render($dashboardWidgetSetting);
- } else {
- return 'Class : ' . $widgetClassName .' could not be found!';
+ $widgetController = $this->objectManager->get($widgetClassName);
+ return $widgetController->render($widget);
}
+ return 'Class : ' . htmlspecialchars($widgetClassName) . ' could not be found!';
}
}
diff --git a/Classes/DashboardWidgets/ActionWidget.php b/Classes/Widget/ActionWidgetController.php
similarity index 83%
rename from Classes/DashboardWidgets/ActionWidget.php
rename to Classes/Widget/ActionWidgetController.php
index 47e4b32..ee72df5 100644
--- a/Classes/DashboardWidgets/ActionWidget.php
+++ b/Classes/Widget/ActionWidgetController.php
@@ -1,5 +1,5 @@
initialize($dashboardWidgetSetting);
- $content = $this->generateContent();
- return $content;
+ $this->initialize($widget);
+ return $this->generateContent();
}
/**
* Initializes settings from flexform
- * @param \TYPO3\CMS\Dashboard\Domain\Model\DashboardWidgetSettings $dashboardWidgetSetting
+ *
+ * @param Widget $widget
* @return void
*/
- private function initialize($dashboardWidgetSetting = null)
+ private function initialize($widget = null)
{
- $flexformSettings = $this->getFlexFormSettings($dashboardWidgetSetting);
- $this->limit = (int)$flexformSettings['settings']['limit'];
- $this->widget = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dashboard']['widgets'][$dashboardWidgetSetting->getWidgetIdentifier()];
+ $settings = $widget->getSettings();
+ $this->limit = (int)$settings['limit'];
+ $this->widget = $settings;
}
/**
* Generates the content
+ * @throws \Exception
* @return string
- * @throws 1910010001
*/
private function generateContent()
{
if (!ExtensionManagementUtility::isLoaded('sys_action')) {
- throw new \Exception("Extension sys_actions is not enabled", 1910010001);
+ throw new \Exception('Extension sys_actions is not enabled', 1910010001);
}
- $actionEntries = [];
$widgetTemplateName = $this->widget['template'];
$actionView = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class)
->get(StandaloneView::class);
@@ -154,7 +160,7 @@ protected function getActions()
. '&SET[function]=sys_action.'
. \TYPO3\CMS\SysAction\ActionTask::class
. '&show='
- . (int)$actionRow['uid']
+ . (int)$actionRow['uid'],
];
}
diff --git a/Classes/DashboardWidgets/IframeWidget.php b/Classes/Widget/IframeWidgetController.php
similarity index 65%
rename from Classes/DashboardWidgets/IframeWidget.php
rename to Classes/Widget/IframeWidgetController.php
index 6d326c6..6d06953 100644
--- a/Classes/DashboardWidgets/IframeWidget.php
+++ b/Classes/Widget/IframeWidgetController.php
@@ -1,5 +1,5 @@
initialize($dashboardWidgetSetting);
- $content = $this->generateContent();
- return $content;
+ $this->initialize($widget);
+ return $this->generateContent();
}
/**
* Initializes settings from flexform
- * @param DashboardWidgetSettings $dashboardWidgetSetting
+ *
+ * @param Widget $widget
* @return void
*/
- private function initialize($dashboardWidgetSetting = null)
+ private function initialize($widget = null)
{
- $flexformSettings = $this->getFlexFormSettings($dashboardWidgetSetting);
- $this->url = $flexformSettings['settings']['url'];
- $this->scrolling = $flexformSettings['settings']['scrolling'];
- $this->widget = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dashboard']['widgets'][$dashboardWidgetSetting->getWidgetIdentifier()];
+ $settings = $widget->getSettings();
+ $this->url = $settings['url'];
+ $this->scrolling = $settings['scrolling'];
+ $this->widget = $settings;
}
/**
@@ -80,10 +79,10 @@ private function generateContent()
$actionView = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
$template = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($widgetTemplateName);
$actionView->setTemplatePathAndFilename($template);
- $actionView->assignMultiple(array(
+ $actionView->assignMultiple([
'url' => $this->url,
- 'scrolling' => $this->scrolling
- ));
+ 'scrolling' => $this->scrolling,
+ ]);
return $actionView->render();
}
}
diff --git a/Classes/Widget/RssWidgetController.php b/Classes/Widget/RssWidgetController.php
new file mode 100644
index 0000000..29a747c
--- /dev/null
+++ b/Classes/Widget/RssWidgetController.php
@@ -0,0 +1,230 @@
+initialize($widget);
+ if ($this->cacheLifetime > 0) {
+ $content = $this->generateContent();
+ } else {
+ /** @var \TYPO3\CMS\Core\Cache\CacheManager $cacheManager */
+ $cacheManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('TYPO3\\CMS\\Core\\Cache\\CacheManager');
+ $cacheIdentifier = 'dashboardWidget_' . (int)$widget->getUid();
+
+ if (true === $cacheManager->hasCache('dashboard') && true === $cacheManager->getCache('dashboard')->has($cacheIdentifier)) {
+ $content = $cacheManager->getCache('dashboard')->get($cacheIdentifier);
+ } else {
+ $content = $this->generateContent();
+ $cacheManager->getCache('dashboard')->set($cacheIdentifier, $content, [], $this->cacheLifetime);
+ }
+ unset($cacheManager);
+ }
+ return $content;
+ }
+
+ /**
+ * Initializes settings from flexform
+ * @param Widget $widget
+ * @return void
+ */
+ private function initialize($widget = null)
+ {
+ $settings = $widget->getSettings();
+ $this->feedUrl = $settings['feedUrl'];
+ $this->feedLimit = (int)$settings['feedLimit'];
+ $this->cacheLifetime = (int)$settings['cacheLifetime'] * 60;
+ $this->widget = $settings;
+ }
+
+ /**
+ * Generates the content
+ * @return string
+ */
+ private function generateContent()
+ {
+ $widgetTemplateName = $this->widget['template'];
+ $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+ $rssView = $objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
+ $template = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($widgetTemplateName);
+ $rssView->setTemplatePathAndFilename($template);
+ $feed = $this->getFeed();
+ $rssView->assign('feed', $feed);
+ $rssView->assign('currentdate', time());
+ $rssView->assign('cacheLifetime', $this->cacheLifetime);
+ return $rssView->render();
+ }
+
+ /**
+ * Loads feed and cuts unneeded items
+ *
+ * @return array Array from xml
+ */
+ private function getFeed()
+ {
+ $feed = [];
+ $report = [];
+ if (\TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($this->feedUrl)) {
+ $content = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl(
+ $this->feedUrl,
+ 0,
+ null,
+ $report
+ );
+ if (!$content) {
+ if (isset($report['message'])) {
+ throw new \Exception($report['message'], $report['error']);
+ }
+ throw new \Exception('The response was empty', 1910020001);
+ }
+ if (!empty($content)) {
+ $simpleXmlElement = simplexml_load_string($content, 'SimpleXMLElement');
+ if (!$simpleXmlElement) {
+ throw new \Exception('The response is not valid XML', 1910020003);
+ }
+ $feed['channel'] = $this->rssToArray($simpleXmlElement);
+ if ((int)$this->feedLimit > 0) {
+ $feed['channel']['item'] = array_splice($feed['channel']['item'], 0, $this->feedLimit);
+ }
+ } else {
+ throw new \Exception('An error occured', 1910020002);
+ }
+ } else {
+ throw new \Exception('The provided url is not valid', 1910020004);
+ }
+ return $feed;
+ }
+
+ /**
+ * rssToArray RSS to array from a SimpleXMLElement
+ * @param \SimpleXmlElement $simpleXmlElement
+ * @return array
+ */
+ private function rssToArray($simpleXmlElement)
+ {
+ $rss2Array = [];
+ $rss2Array = $this->sxeToArray($simpleXmlElement->channel);
+ foreach ($simpleXmlElement->channel->item as $simpleXmlElementItem) {
+ $simpleXmlElementArray = $this->sxeToArray($simpleXmlElementItem);
+ if ($simpleXmlElementArray) {
+ $rss2Array['item'][] = $simpleXmlElementArray;
+ }
+ }
+ return $rss2Array;
+ }
+
+ /**
+ * sxeToArray Generates the base array for the element, also includes namespaces.
+ * @param \SimpleXMLElement $simpleXmlElement The element to create an array of
+ * @return array
+ */
+ private function sxeToArray($simpleXmlElement)
+ {
+ $returnArray = false;
+ $children = $simpleXmlElement->children();
+ $sxeChildrenToArray = $this->sxeChildrenToArray($children);
+ if ($sxeChildrenToArray) {
+ $returnArray = $sxeChildrenToArray;
+ }
+ $namespaces = $simpleXmlElement->getNamespaces(true);
+ foreach ($namespaces as $ns => $nsuri) {
+ $children = $simpleXmlElement->children($ns, true);
+ $sxeChildrenToArray = $this->sxeChildrenToArray($children);
+ if ($sxeChildrenToArray) {
+ $returnArray[$ns] = $sxeChildrenToArray;
+ }
+ }
+ return $returnArray;
+ }
+
+ /**
+ * sxeChildrenToArray Returns an array of the elements children and attributes recursively
+ * @param mixed $children The children of a element
+ * @return array
+ */
+ private function sxeChildrenToArray($children)
+ {
+ $nodeData = [];
+ if (count($children) > 0) {
+ foreach ($children as $elementName => $node) {
+ $nodeName = $this->stringToArrayKey((string)$elementName);
+ $nodeData[$nodeName] = [];
+ $nodeAttributes = $node->attributes();
+ if (count($nodeAttributes) > 0) {
+ foreach ($nodeAttributes as $nodeAttributeName => $nodeAttributeValue) {
+ $arrayKey = $this->stringToArrayKey((string)$nodeAttributeName);
+ $arrayValue = trim((string)$nodeAttributeValue->__toString());
+ $nodeData[$nodeName][$arrayKey] = $arrayValue;
+ }
+ }
+ $nodeValue = trim((string)$node);
+ if (strlen($nodeValue) > 0) {
+ if (count($nodeAttributes) == 0) {
+ $nodeData[$nodeName] = $nodeValue;
+ } else {
+ $nodeData[$nodeName]['value'] = $nodeValue;
+ }
+ } else {
+ if ($nodeName != 'item') {
+ $childs = $this->sxeToArray($node);
+ if ($childs) {
+ $nodeData[$nodeName] = $childs;
+ }
+ }
+ }
+ }
+ return $nodeData;
+ }
+ return false;
+ }
+
+ /**
+ * stringToArrayKey Returns a string which is ok to use as array key
+ * @param string $key The array key to check
+ * @return string
+ */
+ private function stringToArrayKey($key)
+ {
+ return str_replace('.', '_', trim((string)$key));
+ }
+}
diff --git a/Classes/DashboardWidgets/SysNewsWidget.php b/Classes/Widget/SysNewsWidgetController.php
similarity index 74%
rename from Classes/DashboardWidgets/SysNewsWidget.php
rename to Classes/Widget/SysNewsWidgetController.php
index 6cf3086..3903828 100644
--- a/Classes/DashboardWidgets/SysNewsWidget.php
+++ b/Classes/Widget/SysNewsWidgetController.php
@@ -1,5 +1,5 @@
initialize($dashboardWidgetSetting);
- $content = $this->generateContent();
- return $content;
+ $this->initialize($widget);
+ return $this->generateContent();
}
/**
* Initializes settings from flexform
- * @param \TYPO3\CMS\Dashboard\Domain\Model\DashboardWidgetSettings $dashboardWidgetSetting
+ *
+ * @param Widget $widget
* @return void
*/
- private function initialize($dashboardWidgetSetting = null)
+ private function initialize($widget = null)
{
- $flexformSettings = $this->getFlexFormSettings($dashboardWidgetSetting);
- $this->limit = (int)$flexformSettings['settings']['limit'];
- $this->widget = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dashboard']['widgets'][$dashboardWidgetSetting->getWidgetIdentifier()];
+ $settings = $widget->getSettings();
+ $this->limit = (int)$settings['limit'];
+ $this->widget = $settings;
}
/**
@@ -77,7 +84,7 @@ private function generateContent()
protected function getSystemNews()
{
$systemNewsTable = 'sys_news';
- $systemNews = array();
+ $systemNews = [];
$systemNewsRecords = $this->getDatabaseConnection()->exec_SELECTgetRows(
'title, content, crdate',
$systemNewsTable,
@@ -87,11 +94,11 @@ protected function getSystemNews()
$this->getLimit()
);
foreach ($systemNewsRecords as $systemNewsRecord) {
- $systemNews[] = array(
+ $systemNews[] = [
'date' => $systemNewsRecord['crdate'],
'header' => $systemNewsRecord['title'],
- 'content' => $systemNewsRecord['content']
- );
+ 'content' => $systemNewsRecord['content'],
+ ];
}
return $systemNews;
}
diff --git a/Classes/Widget/WidgetControllerInterface.php b/Classes/Widget/WidgetControllerInterface.php
new file mode 100644
index 0000000..8cec8cc
--- /dev/null
+++ b/Classes/Widget/WidgetControllerInterface.php
@@ -0,0 +1,15 @@
+ [
- 'title' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_dashboard',
+ 'title' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_dashboard',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
@@ -18,14 +18,14 @@
'starttime' => 'starttime',
'endtime' => 'endtime',
],
- 'searchFields' => 'title,description,dashboard_widget_settings,beuser,',
- 'iconfile' => 'EXT:dashboard/Resources/Public/Icons/tx_dashboard_domain_model_dashboard.gif'
+ 'searchFields' => 'title,description,widgets,beuser,',
+ 'iconfile' => 'EXT:dashboard/Resources/Public/Icons/tx_dashboard_domain_model_dashboard.gif',
],
'interface' => [
- 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, description, dashboard_widget_settings, beuser',
+ 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, description, widgets, beuser',
],
'types' => [
- '1' => ['showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title, description, dashboard_widget_settings, beuser, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'],
+ '1' => ['showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title, description, widgets, beuser, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'],
],
'palettes' => [
'1' => ['showitem' => ''],
@@ -48,7 +48,7 @@
'items' => [
[
'',
- 0
+ 0,
],
],
'foreign_table' => 'tx_dashboard_domain_model_dashboard',
@@ -66,7 +66,6 @@
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
-
],
],
'starttime' => [
@@ -81,7 +80,7 @@
'checkbox' => 0,
'default' => 0,
'range' => [
- 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
+ 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')),
],
],
],
@@ -97,7 +96,7 @@
'checkbox' => 0,
'default' => 0,
'range' => [
- 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
+ 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')),
],
],
],
@@ -107,7 +106,7 @@
'config' => [
'type' => 'input',
'size' => 30,
- 'eval' => 'trim,required'
+ 'eval' => 'trim,required',
],
],
'description' => [
@@ -116,26 +115,19 @@
'config' => [
'type' => 'input',
'size' => 30,
- 'eval' => 'trim'
+ 'eval' => 'trim',
],
],
- 'dashboard_widget_settings' => [
+ 'widgets' => [
'exclude' => 1,
- 'label' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_dashboard.dashboard_widget_settings',
+ 'label' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_dashboard.widgets',
'config' => [
- 'type' => 'inline',
- 'foreign_table' => 'tx_dashboard_domain_model_dashboardwidgetsettings',
+ 'type' => 'select',
+ 'renderType' => 'selectMultipleSideBySide',
+ 'foreign_table' => 'tx_dashboard_domain_model_widget',
'foreign_field' => 'dashboard',
'foreign_sortby' => 'sorting',
- 'MM_opposite_field' => 'dashboard',
'maxitems' => 9999,
- 'appearance' => [
- 'collapseAll' => 1,
- 'levelLinksPosition' => 'top',
- 'showSynchronizationLink' => 1,
- 'showPossibleLocalizationRecords' => 1,
- 'showAllLocalizationLink' => 1
- ],
],
],
'beuser' => [
@@ -152,7 +144,7 @@
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
- 'showAllLocalizationLink' => 1
+ 'showAllLocalizationLink' => 1,
],
],
],
diff --git a/Configuration/TCA/tx_dashboard_domain_model_dashboardwidgetsettings.php b/Configuration/TCA/tx_dashboard_domain_model_widget.php
similarity index 69%
rename from Configuration/TCA/tx_dashboard_domain_model_dashboardwidgetsettings.php
rename to Configuration/TCA/tx_dashboard_domain_model_widget.php
index dfc180c..f37dbb9 100644
--- a/Configuration/TCA/tx_dashboard_domain_model_dashboardwidgetsettings.php
+++ b/Configuration/TCA/tx_dashboard_domain_model_widget.php
@@ -1,7 +1,7 @@
[
- 'title' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_dashboardwidgetsettings',
+ 'title' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_widget',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
@@ -13,21 +13,21 @@
'transOrigDiffSourceField' => 'l10n_diffsource',
'delete' => 'deleted',
'enablecolumns' => [],
+ 'requestUpdate' => 'widget_identifier',
'searchFields' => 'title,widget_identifier,position,settings_flexform,',
- 'iconfile' => 'EXT:dashboard/Resources/Public/Icons/tx_dashboard_domain_model_dashboardwidgetsettings.gif'
-
+ 'iconfile' => 'EXT:dashboard/Resources/Public/Icons/tx_dashboard_domain_model_widget.gif',
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, widget_identifier, position, settings_flexform, dashboard, x, y, width, height',
],
'types' => [
'1' => [
- 'showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, title, widget_identifier, position, settings_flexform, dashboard, x, y, width, height, '
+ 'showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, widget_identifier, title, position, settings_flexform, dashboard',
],
],
'palettes' => [
'1' => [
- 'showitem' => ''
+ 'showitem' => '',
],
],
'columns' => [
@@ -48,8 +48,8 @@
'items' => [
['', 0],
],
- 'foreign_table' => 'tx_dashboard_domain_model_dashboardwidgetsettings',
- 'foreign_table_where' => 'AND tx_dashboard_domain_model_dashboardwidgetsettings.pid=###CURRENT_PID### AND tx_dashboard_domain_model_dashboardwidgetsettings.sys_language_uid IN (-1,0)',
+ 'foreign_table' => 'tx_dashboard_domain_model_widget',
+ 'foreign_table_where' => 'AND tx_dashboard_domain_model_widget.pid=###CURRENT_PID### AND tx_dashboard_domain_model_widget.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
@@ -60,16 +60,16 @@
'title' => [
'exclude' => 1,
- 'label' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_dashboardwidgetsettings.title',
+ 'label' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_widget.title',
'config' => [
'type' => 'input',
'size' => 30,
- 'eval' => 'trim'
+ 'eval' => 'trim',
],
],
'widget_identifier' => [
'exclude' => 1,
- 'label' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_dashboardwidgetsettings.widget_identifier',
+ 'label' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_widget.widget_identifier',
'config' => [
'type' => 'select',
'readOnly' => 1,
@@ -77,23 +77,23 @@
'items' => [
[
'-- Label --',
- '0'
+ '0',
],
[
'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:dashboardWidget.rsswidget.name',
- \TYPO3\CMS\Dashboard\DashboardWidgets\RssWidget::IDENTIFIER
+ \Pixelant\Dashboard\Widget\RssWidgetController::IDENTIFIER,
],
[
'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:dashboardWidget.actionwidget.name',
- \TYPO3\CMS\Dashboard\DashboardWidgets\ActionWidget::IDENTIFIER
+ \Pixelant\Dashboard\Widget\ActionWidgetController::IDENTIFIER,
],
[
'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:dashboardWidget.sysnewswidget.name',
- \TYPO3\CMS\Dashboard\DashboardWidgets\SysNewsWidget::IDENTIFIER
+ \Pixelant\Dashboard\Widget\SysNewsWidgetController::IDENTIFIER,
],
[
'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:dashboardWidget.iframe.name',
- \TYPO3\CMS\Dashboard\DashboardWidgets\IframeWidget::IDENTIFIER
+ \Pixelant\Dashboard\Widget\IframeWidgetController::IDENTIFIER,
],
],
'size' => 1,
@@ -109,7 +109,7 @@
'type' => 'input',
'readOnly' => 1,
'size' => 30,
- 'eval' => 'int'
+ 'eval' => 'int',
],
],
'y' => [
@@ -117,9 +117,9 @@
'label' => 'y',
'config' => [
'type' => 'input',
- 'readOnly' => 1,
+ 'readOnly' => 1,
'size' => 30,
- 'eval' => 'int'
+ 'eval' => 'int',
],
],
'width' => [
@@ -127,9 +127,9 @@
'label' => 'width',
'config' => [
'type' => 'input',
- 'readOnly' => 1,
+ 'readOnly' => 1,
'size' => 30,
- 'eval' => 'int'
+ 'eval' => 'int',
],
],
'height' => [
@@ -137,27 +137,28 @@
'label' => 'height',
'config' => [
'type' => 'input',
- 'readOnly' => 1,
+ 'readOnly' => 1,
'size' => 30,
- 'eval' => 'int'
+ 'eval' => 'int',
],
],
'settings_flexform' => [
'exclude' => 1,
- 'label' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_dashboardwidgetsettings.settings_flexform',
+ 'label' => 'LLL:EXT:dashboard/Resources/Private/Language/locallang_db.xlf:tx_dashboard_domain_model_widget.settings_flexform',
'config' => [
'type' => 'flex',
'ds_pointerField' => 'widget_identifier',
'ds' => [
- \TYPO3\CMS\Dashboard\DashboardWidgets\RssWidget::IDENTIFIER => 'FILE:EXT:dashboard/Configuration/FlexForms/flexform_rsswidget.xml',
- \TYPO3\CMS\Dashboard\DashboardWidgets\ActionWidget::IDENTIFIER => 'FILE:EXT:dashboard/Configuration/FlexForms/flexform_actionwidget.xml',
- \TYPO3\CMS\Dashboard\DashboardWidgets\SysNewsWidget::IDENTIFIER => 'FILE:EXT:dashboard/Configuration/FlexForms/flexform_sysnewswidget.xml',
- \TYPO3\CMS\Dashboard\DashboardWidgets\IframeWidget::IDENTIFIER => 'FILE:EXT:dashboard/Configuration/FlexForms/flexform_iframewidget.xml',
+ \Pixelant\Dashboard\Widget\RssWidgetController::IDENTIFIER => 'FILE:EXT:dashboard/Configuration/FlexForms/flexform_rsswidget.xml',
+ \Pixelant\Dashboard\Widget\ActionWidgetController::IDENTIFIER => 'FILE:EXT:dashboard/Configuration/FlexForms/flexform_actionwidget.xml',
+ \Pixelant\Dashboard\Widget\SysNewsWidgetController::IDENTIFIER => 'FILE:EXT:dashboard/Configuration/FlexForms/flexform_sysnewswidget.xml',
+ \Pixelant\Dashboard\Widget\IframeWidgetController::IDENTIFIER => 'FILE:EXT:dashboard/Configuration/FlexForms/flexform_iframewidget.xml',
'default' => '