@@ -22,108 +22,108 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | class NewButton extends AbstractComponentView |
| 24 | 24 | { |
| 25 | - /** |
|
| 26 | - * Renders a "new" button to be placed in the doc header. |
|
| 27 | - * |
|
| 28 | - * @return string |
|
| 29 | - */ |
|
| 30 | - public function render(): string |
|
| 31 | - { |
|
| 32 | - $output = ''; |
|
| 25 | + /** |
|
| 26 | + * Renders a "new" button to be placed in the doc header. |
|
| 27 | + * |
|
| 28 | + * @return string |
|
| 29 | + */ |
|
| 30 | + public function render(): string |
|
| 31 | + { |
|
| 32 | + $output = ''; |
|
| 33 | 33 | |
| 34 | - // New button only for the current data type. |
|
| 35 | - if ($this->getModulePidService()->isConfiguredPidValid()) { |
|
| 36 | - $output = $this->makeLinkButton()->setHref($this->getNewUri()) |
|
| 37 | - ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:newRecordGeneral')) |
|
| 38 | - ->setIcon($this->getIconFactory()->getIcon('actions-document-new', Icon::SIZE_SMALL)) |
|
| 39 | - ->render(); |
|
| 40 | - } |
|
| 41 | - return $output; |
|
| 42 | - } |
|
| 34 | + // New button only for the current data type. |
|
| 35 | + if ($this->getModulePidService()->isConfiguredPidValid()) { |
|
| 36 | + $output = $this->makeLinkButton()->setHref($this->getNewUri()) |
|
| 37 | + ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:newRecordGeneral')) |
|
| 38 | + ->setIcon($this->getIconFactory()->getIcon('actions-document-new', Icon::SIZE_SMALL)) |
|
| 39 | + ->render(); |
|
| 40 | + } |
|
| 41 | + return $output; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * Render a create URI given a data type. |
|
| 46 | - * |
|
| 47 | - * @return string |
|
| 48 | - */ |
|
| 49 | - protected function getUriWizardNew(): string |
|
| 50 | - { |
|
| 51 | - // Return URL in any case. |
|
| 52 | - $arguments['returnUrl'] = $this->getModuleLoader()->getModuleUrl(); |
|
| 44 | + /** |
|
| 45 | + * Render a create URI given a data type. |
|
| 46 | + * |
|
| 47 | + * @return string |
|
| 48 | + */ |
|
| 49 | + protected function getUriWizardNew(): string |
|
| 50 | + { |
|
| 51 | + // Return URL in any case. |
|
| 52 | + $arguments['returnUrl'] = $this->getModuleLoader()->getModuleUrl(); |
|
| 53 | 53 | |
| 54 | - // Add possible id parameter |
|
| 55 | - if (GeneralUtility::_GP(Parameter::PID)) { |
|
| 56 | - $arguments['id'] = GeneralUtility::_GP(Parameter::PID); |
|
| 57 | - } |
|
| 54 | + // Add possible id parameter |
|
| 55 | + if (GeneralUtility::_GP(Parameter::PID)) { |
|
| 56 | + $arguments['id'] = GeneralUtility::_GP(Parameter::PID); |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - $uri = BackendUtility::getModuleUrl( |
|
| 60 | - 'db_new', |
|
| 61 | - $arguments |
|
| 62 | - ); |
|
| 59 | + $uri = BackendUtility::getModuleUrl( |
|
| 60 | + 'db_new', |
|
| 61 | + $arguments |
|
| 62 | + ); |
|
| 63 | 63 | |
| 64 | - return $uri; |
|
| 65 | - } |
|
| 64 | + return $uri; |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - /** |
|
| 68 | - * Render a create URI given a data type. |
|
| 69 | - * |
|
| 70 | - * @return string |
|
| 71 | - */ |
|
| 72 | - protected function getNewUri(): string |
|
| 73 | - { |
|
| 74 | - $uri = BackendUtility::getModuleUrl( |
|
| 75 | - 'record_edit', |
|
| 76 | - array( |
|
| 77 | - $this->getNewParameterName() => 'new', |
|
| 78 | - 'returnUrl' => $this->getModuleLoader()->getModuleUrl() |
|
| 79 | - ) |
|
| 80 | - ); |
|
| 81 | - return $uri; |
|
| 82 | - } |
|
| 67 | + /** |
|
| 68 | + * Render a create URI given a data type. |
|
| 69 | + * |
|
| 70 | + * @return string |
|
| 71 | + */ |
|
| 72 | + protected function getNewUri(): string |
|
| 73 | + { |
|
| 74 | + $uri = BackendUtility::getModuleUrl( |
|
| 75 | + 'record_edit', |
|
| 76 | + array( |
|
| 77 | + $this->getNewParameterName() => 'new', |
|
| 78 | + 'returnUrl' => $this->getModuleLoader()->getModuleUrl() |
|
| 79 | + ) |
|
| 80 | + ); |
|
| 81 | + return $uri; |
|
| 82 | + } |
|
| 83 | 83 | |
| 84 | - /** |
|
| 85 | - * @return string |
|
| 86 | - */ |
|
| 87 | - protected function getNewParameterName(): string |
|
| 88 | - { |
|
| 89 | - return sprintf( |
|
| 90 | - 'edit[%s][%s]', |
|
| 91 | - $this->getModuleLoader()->getDataType(), |
|
| 92 | - $this->getStoragePid() |
|
| 93 | - ); |
|
| 94 | - } |
|
| 84 | + /** |
|
| 85 | + * @return string |
|
| 86 | + */ |
|
| 87 | + protected function getNewParameterName(): string |
|
| 88 | + { |
|
| 89 | + return sprintf( |
|
| 90 | + 'edit[%s][%s]', |
|
| 91 | + $this->getModuleLoader()->getDataType(), |
|
| 92 | + $this->getStoragePid() |
|
| 93 | + ); |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | - /** |
|
| 97 | - * Return the default configured pid. |
|
| 98 | - * |
|
| 99 | - * @return int |
|
| 100 | - */ |
|
| 101 | - protected function getStoragePid(): int |
|
| 102 | - { |
|
| 103 | - if (GeneralUtility::_GP(Parameter::PID)) { |
|
| 104 | - $pid = GeneralUtility::_GP(Parameter::PID); |
|
| 105 | - } elseif ((int)Tca::table()->get('rootLevel') === 1) { |
|
| 106 | - $pid = 0; |
|
| 107 | - } else { |
|
| 108 | - // Get configuration from User TSConfig if any |
|
| 109 | - $tsConfigPath = sprintf('tx_vidi.dataType.%s.storagePid', $this->getModuleLoader()->getDataType()); |
|
| 110 | - $tsConfig = $this->getBackendUser()->getTSConfig($tsConfigPath); |
|
| 111 | - $pid = $tsConfig['value']; |
|
| 96 | + /** |
|
| 97 | + * Return the default configured pid. |
|
| 98 | + * |
|
| 99 | + * @return int |
|
| 100 | + */ |
|
| 101 | + protected function getStoragePid(): int |
|
| 102 | + { |
|
| 103 | + if (GeneralUtility::_GP(Parameter::PID)) { |
|
| 104 | + $pid = GeneralUtility::_GP(Parameter::PID); |
|
| 105 | + } elseif ((int)Tca::table()->get('rootLevel') === 1) { |
|
| 106 | + $pid = 0; |
|
| 107 | + } else { |
|
| 108 | + // Get configuration from User TSConfig if any |
|
| 109 | + $tsConfigPath = sprintf('tx_vidi.dataType.%s.storagePid', $this->getModuleLoader()->getDataType()); |
|
| 110 | + $tsConfig = $this->getBackendUser()->getTSConfig($tsConfigPath); |
|
| 111 | + $pid = $tsConfig['value']; |
|
| 112 | 112 | |
| 113 | - // Get pid from Module Loader |
|
| 114 | - if (null === $pid) { |
|
| 115 | - $pid = $this->getModuleLoader()->getDefaultPid(); |
|
| 116 | - } |
|
| 117 | - } |
|
| 118 | - return (int)$pid; |
|
| 119 | - } |
|
| 113 | + // Get pid from Module Loader |
|
| 114 | + if (null === $pid) { |
|
| 115 | + $pid = $this->getModuleLoader()->getDefaultPid(); |
|
| 116 | + } |
|
| 117 | + } |
|
| 118 | + return (int)$pid; |
|
| 119 | + } |
|
| 120 | 120 | |
| 121 | - /** |
|
| 122 | - * @return ModulePidService|object |
|
| 123 | - */ |
|
| 124 | - public function getModulePidService() |
|
| 125 | - { |
|
| 126 | - /** @var ModulePidService $modulePidService */ |
|
| 127 | - return GeneralUtility::makeInstance(ModulePidService::class); |
|
| 128 | - } |
|
| 121 | + /** |
|
| 122 | + * @return ModulePidService|object |
|
| 123 | + */ |
|
| 124 | + public function getModulePidService() |
|
| 125 | + { |
|
| 126 | + /** @var ModulePidService $modulePidService */ |
|
| 127 | + return GeneralUtility::makeInstance(ModulePidService::class); |
|
| 128 | + } |
|
| 129 | 129 | } |
@@ -17,31 +17,31 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | class ToolButton extends AbstractComponentView |
| 19 | 19 | { |
| 20 | - /** |
|
| 21 | - * Renders a dropdown menu for storage. |
|
| 22 | - * |
|
| 23 | - * @return string |
|
| 24 | - */ |
|
| 25 | - public function render() |
|
| 26 | - { |
|
| 27 | - $result = ''; |
|
| 20 | + /** |
|
| 21 | + * Renders a dropdown menu for storage. |
|
| 22 | + * |
|
| 23 | + * @return string |
|
| 24 | + */ |
|
| 25 | + public function render() |
|
| 26 | + { |
|
| 27 | + $result = ''; |
|
| 28 | 28 | |
| 29 | - // Compute the additional parameters. |
|
| 30 | - $additionalParameters = array( |
|
| 31 | - $this->getModuleLoader()->getParameterPrefix() => array('controller' => 'Tool', 'action' => 'welcome'), |
|
| 32 | - ); |
|
| 29 | + // Compute the additional parameters. |
|
| 30 | + $additionalParameters = array( |
|
| 31 | + $this->getModuleLoader()->getParameterPrefix() => array('controller' => 'Tool', 'action' => 'welcome'), |
|
| 32 | + ); |
|
| 33 | 33 | |
| 34 | - // Get current data type and tell whether there are registered tools. |
|
| 35 | - $dataType = $this->getModuleLoader()->getDataType(); |
|
| 34 | + // Get current data type and tell whether there are registered tools. |
|
| 35 | + $dataType = $this->getModuleLoader()->getDataType(); |
|
| 36 | 36 | |
| 37 | - if (ToolRegistry::getInstance()->hasAnyTools($dataType)) { |
|
| 38 | - $result = sprintf( |
|
| 39 | - '<a href="%s&returnUrl=%s" class="btn btn-default btn-sm btn-doc-header" title="%s"><span class="t3-icon fa fa-cog" aria-hidden="true"></span></a>', |
|
| 40 | - $this->getModuleLoader()->getModuleUrl($additionalParameters), |
|
| 41 | - urlencode($this->getModuleLoader()->getModuleUrl()), |
|
| 42 | - $this->getLanguageService()->sL('LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:open_tools') |
|
| 43 | - ); |
|
| 44 | - } |
|
| 45 | - return $result; |
|
| 46 | - } |
|
| 37 | + if (ToolRegistry::getInstance()->hasAnyTools($dataType)) { |
|
| 38 | + $result = sprintf( |
|
| 39 | + '<a href="%s&returnUrl=%s" class="btn btn-default btn-sm btn-doc-header" title="%s"><span class="t3-icon fa fa-cog" aria-hidden="true"></span></a>', |
|
| 40 | + $this->getModuleLoader()->getModuleUrl($additionalParameters), |
|
| 41 | + urlencode($this->getModuleLoader()->getModuleUrl()), |
|
| 42 | + $this->getLanguageService()->sL('LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:open_tools') |
|
| 43 | + ); |
|
| 44 | + } |
|
| 45 | + return $result; |
|
| 46 | + } |
|
| 47 | 47 | } |
@@ -20,34 +20,34 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | class EditButton extends AbstractComponentView |
| 22 | 22 | { |
| 23 | - /** |
|
| 24 | - * Renders a "edit" button to be placed in the grid. |
|
| 25 | - * |
|
| 26 | - * @param Content $object |
|
| 27 | - * @return string |
|
| 28 | - */ |
|
| 29 | - public function render(Content $object = null) |
|
| 30 | - { |
|
| 31 | - $editUri = $this->getUriRenderer()->render($object); |
|
| 23 | + /** |
|
| 24 | + * Renders a "edit" button to be placed in the grid. |
|
| 25 | + * |
|
| 26 | + * @param Content $object |
|
| 27 | + * @return string |
|
| 28 | + */ |
|
| 29 | + public function render(Content $object = null) |
|
| 30 | + { |
|
| 31 | + $editUri = $this->getUriRenderer()->render($object); |
|
| 32 | 32 | |
| 33 | - return $this->makeLinkButton() |
|
| 34 | - ->setHref($editUri) |
|
| 35 | - ->setDataAttributes([ |
|
| 36 | - 'uid' => $object->getUid(), |
|
| 37 | - 'toggle' => 'tooltip', |
|
| 38 | - ]) |
|
| 39 | - ->setClasses('btn-edit') |
|
| 40 | - ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit')) |
|
| 41 | - ->setIcon($this->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL)) |
|
| 42 | - ->render(); |
|
| 43 | - } |
|
| 33 | + return $this->makeLinkButton() |
|
| 34 | + ->setHref($editUri) |
|
| 35 | + ->setDataAttributes([ |
|
| 36 | + 'uid' => $object->getUid(), |
|
| 37 | + 'toggle' => 'tooltip', |
|
| 38 | + ]) |
|
| 39 | + ->setClasses('btn-edit') |
|
| 40 | + ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit')) |
|
| 41 | + ->setIcon($this->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL)) |
|
| 42 | + ->render(); |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * @return EditUri |
|
| 47 | - * @throws \InvalidArgumentException |
|
| 48 | - */ |
|
| 49 | - protected function getUriRenderer() |
|
| 50 | - { |
|
| 51 | - return GeneralUtility::makeInstance(EditUri::class); |
|
| 52 | - } |
|
| 45 | + /** |
|
| 46 | + * @return EditUri |
|
| 47 | + * @throws \InvalidArgumentException |
|
| 48 | + */ |
|
| 49 | + protected function getUriRenderer() |
|
| 50 | + { |
|
| 51 | + return GeneralUtility::makeInstance(EditUri::class); |
|
| 52 | + } |
|
| 53 | 53 | } |
@@ -18,51 +18,51 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | class ClipboardButton extends AbstractComponentView |
| 20 | 20 | { |
| 21 | - /** |
|
| 22 | - * Renders a "clipboard" button to be placed in the doc header. |
|
| 23 | - * |
|
| 24 | - * @return string |
|
| 25 | - */ |
|
| 26 | - public function render() |
|
| 27 | - { |
|
| 28 | - $button = $this->makeLinkButton() |
|
| 29 | - ->setHref($this->getShowClipboardUri()) |
|
| 30 | - ->setDataAttributes([ |
|
| 31 | - 'style' => $this->getClipboardService()->hasItems() ? '' : 'display: none;', |
|
| 32 | - ]) |
|
| 33 | - ->setClasses('btn-clipboard-copy-or-move') |
|
| 34 | - ->setTitle($this->getLanguageService()->sL('LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:clipboard.copy_or_move')) |
|
| 35 | - ->setIcon($this->getIconFactory()->getIcon('actions-document-paste-after', Icon::SIZE_SMALL)) |
|
| 36 | - ->render(); |
|
| 21 | + /** |
|
| 22 | + * Renders a "clipboard" button to be placed in the doc header. |
|
| 23 | + * |
|
| 24 | + * @return string |
|
| 25 | + */ |
|
| 26 | + public function render() |
|
| 27 | + { |
|
| 28 | + $button = $this->makeLinkButton() |
|
| 29 | + ->setHref($this->getShowClipboardUri()) |
|
| 30 | + ->setDataAttributes([ |
|
| 31 | + 'style' => $this->getClipboardService()->hasItems() ? '' : 'display: none;', |
|
| 32 | + ]) |
|
| 33 | + ->setClasses('btn-clipboard-copy-or-move') |
|
| 34 | + ->setTitle($this->getLanguageService()->sL('LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:clipboard.copy_or_move')) |
|
| 35 | + ->setIcon($this->getIconFactory()->getIcon('actions-document-paste-after', Icon::SIZE_SMALL)) |
|
| 36 | + ->render(); |
|
| 37 | 37 | |
| 38 | - // Hack! No API for adding a style upon a button |
|
| 39 | - $button = str_replace('data-style', 'style', $button); |
|
| 38 | + // Hack! No API for adding a style upon a button |
|
| 39 | + $button = str_replace('data-style', 'style', $button); |
|
| 40 | 40 | |
| 41 | - $output = sprintf('<div style="float: left; margin-right: 3px">%s</div>', $button); |
|
| 42 | - return $output; |
|
| 43 | - } |
|
| 41 | + $output = sprintf('<div style="float: left; margin-right: 3px">%s</div>', $button); |
|
| 42 | + return $output; |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * @return string |
|
| 47 | - */ |
|
| 48 | - protected function getShowClipboardUri() |
|
| 49 | - { |
|
| 50 | - $additionalParameters = array( |
|
| 51 | - $this->getModuleLoader()->getParameterPrefix() => array( |
|
| 52 | - 'controller' => 'Clipboard', |
|
| 53 | - 'action' => 'show', |
|
| 54 | - ), |
|
| 55 | - ); |
|
| 56 | - return $this->getModuleLoader()->getModuleUrl($additionalParameters); |
|
| 57 | - } |
|
| 45 | + /** |
|
| 46 | + * @return string |
|
| 47 | + */ |
|
| 48 | + protected function getShowClipboardUri() |
|
| 49 | + { |
|
| 50 | + $additionalParameters = array( |
|
| 51 | + $this->getModuleLoader()->getParameterPrefix() => array( |
|
| 52 | + 'controller' => 'Clipboard', |
|
| 53 | + 'action' => 'show', |
|
| 54 | + ), |
|
| 55 | + ); |
|
| 56 | + return $this->getModuleLoader()->getModuleUrl($additionalParameters); |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - /** |
|
| 60 | - * Get the Vidi Module Loader. |
|
| 61 | - * |
|
| 62 | - * @return ClipboardService|object |
|
| 63 | - */ |
|
| 64 | - protected function getClipboardService() |
|
| 65 | - { |
|
| 66 | - return GeneralUtility::makeInstance(ClipboardService::class); |
|
| 67 | - } |
|
| 59 | + /** |
|
| 60 | + * Get the Vidi Module Loader. |
|
| 61 | + * |
|
| 62 | + * @return ClipboardService|object |
|
| 63 | + */ |
|
| 64 | + protected function getClipboardService() |
|
| 65 | + { |
|
| 66 | + return GeneralUtility::makeInstance(ClipboardService::class); |
|
| 67 | + } |
|
| 68 | 68 | } |
@@ -16,25 +16,25 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | class Rows |
| 18 | 18 | { |
| 19 | - /** |
|
| 20 | - * Returns rows of content as array. |
|
| 21 | - * |
|
| 22 | - * @param array $objects |
|
| 23 | - * @param array $columns |
|
| 24 | - * @return array |
|
| 25 | - * @throws \Exception |
|
| 26 | - * @throws \InvalidArgumentException |
|
| 27 | - */ |
|
| 28 | - public function render(array $objects = [], array $columns = array()) |
|
| 29 | - { |
|
| 30 | - $rows = []; |
|
| 19 | + /** |
|
| 20 | + * Returns rows of content as array. |
|
| 21 | + * |
|
| 22 | + * @param array $objects |
|
| 23 | + * @param array $columns |
|
| 24 | + * @return array |
|
| 25 | + * @throws \Exception |
|
| 26 | + * @throws \InvalidArgumentException |
|
| 27 | + */ |
|
| 28 | + public function render(array $objects = [], array $columns = array()) |
|
| 29 | + { |
|
| 30 | + $rows = []; |
|
| 31 | 31 | |
| 32 | - /** @var Row $row */ |
|
| 33 | - $row = GeneralUtility::makeInstance(Row::class, $columns); |
|
| 34 | - foreach ($objects as $index => $object) { |
|
| 35 | - $rows[] = $row->render($object, $index); |
|
| 36 | - } |
|
| 32 | + /** @var Row $row */ |
|
| 33 | + $row = GeneralUtility::makeInstance(Row::class, $columns); |
|
| 34 | + foreach ($objects as $index => $object) { |
|
| 35 | + $rows[] = $row->render($object, $index); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - return $rows; |
|
| 39 | - } |
|
| 38 | + return $rows; |
|
| 39 | + } |
|
| 40 | 40 | } |
@@ -17,35 +17,35 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | class MassDeleteMenuItem extends AbstractComponentView |
| 19 | 19 | { |
| 20 | - /** |
|
| 21 | - * Renders a "mass delete" menu item to be placed in the grid menu. |
|
| 22 | - * |
|
| 23 | - * @return string |
|
| 24 | - * @throws \InvalidArgumentException |
|
| 25 | - */ |
|
| 26 | - public function render() |
|
| 27 | - { |
|
| 28 | - return sprintf( |
|
| 29 | - '<li><a href="%s" class="dropdown-item mass-delete" >%s %s</a>', |
|
| 30 | - $this->getMassDeleteUri(), |
|
| 31 | - $this->getIconFactory()->getIcon('actions-edit-delete', Icon::SIZE_SMALL), |
|
| 32 | - $this->getLanguageService()->sL('LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:delete') |
|
| 33 | - ); |
|
| 34 | - } |
|
| 20 | + /** |
|
| 21 | + * Renders a "mass delete" menu item to be placed in the grid menu. |
|
| 22 | + * |
|
| 23 | + * @return string |
|
| 24 | + * @throws \InvalidArgumentException |
|
| 25 | + */ |
|
| 26 | + public function render() |
|
| 27 | + { |
|
| 28 | + return sprintf( |
|
| 29 | + '<li><a href="%s" class="dropdown-item mass-delete" >%s %s</a>', |
|
| 30 | + $this->getMassDeleteUri(), |
|
| 31 | + $this->getIconFactory()->getIcon('actions-edit-delete', Icon::SIZE_SMALL), |
|
| 32 | + $this->getLanguageService()->sL('LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:delete') |
|
| 33 | + ); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - /** |
|
| 37 | - * @return string |
|
| 38 | - * @throws \InvalidArgumentException |
|
| 39 | - */ |
|
| 40 | - protected function getMassDeleteUri() |
|
| 41 | - { |
|
| 42 | - $additionalParameters = array( |
|
| 43 | - $this->getModuleLoader()->getParameterPrefix() => array( |
|
| 44 | - 'controller' => 'Content', |
|
| 45 | - 'action' => 'delete', |
|
| 46 | - 'format' => 'json', |
|
| 47 | - ), |
|
| 48 | - ); |
|
| 49 | - return $this->getModuleLoader()->getModuleUrl($additionalParameters); |
|
| 50 | - } |
|
| 36 | + /** |
|
| 37 | + * @return string |
|
| 38 | + * @throws \InvalidArgumentException |
|
| 39 | + */ |
|
| 40 | + protected function getMassDeleteUri() |
|
| 41 | + { |
|
| 42 | + $additionalParameters = array( |
|
| 43 | + $this->getModuleLoader()->getParameterPrefix() => array( |
|
| 44 | + 'controller' => 'Content', |
|
| 45 | + 'action' => 'delete', |
|
| 46 | + 'format' => 'json', |
|
| 47 | + ), |
|
| 48 | + ); |
|
| 49 | + return $this->getModuleLoader()->getModuleUrl($additionalParameters); |
|
| 50 | + } |
|
| 51 | 51 | } |
@@ -17,20 +17,20 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | class ExportXmlMenuItem extends AbstractComponentView |
| 19 | 19 | { |
| 20 | - /** |
|
| 21 | - * Renders an "xml export" item to be placed in the menu. |
|
| 22 | - * Only the admin is allowed to export for now as security is not handled. |
|
| 23 | - * |
|
| 24 | - * @return string |
|
| 25 | - * @throws \InvalidArgumentException |
|
| 26 | - */ |
|
| 27 | - public function render() |
|
| 28 | - { |
|
| 29 | - $result = sprintf( |
|
| 30 | - '<li><a href="#" class="dropdown-item export-xml" data-format="xml">%s %s</a></li>', |
|
| 31 | - $this->getIconFactory()->getIcon('mimetypes-text-html', Icon::SIZE_SMALL), |
|
| 32 | - $this->getLanguageService()->sL('LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:export-xml') |
|
| 33 | - ); |
|
| 34 | - return $result; |
|
| 35 | - } |
|
| 20 | + /** |
|
| 21 | + * Renders an "xml export" item to be placed in the menu. |
|
| 22 | + * Only the admin is allowed to export for now as security is not handled. |
|
| 23 | + * |
|
| 24 | + * @return string |
|
| 25 | + * @throws \InvalidArgumentException |
|
| 26 | + */ |
|
| 27 | + public function render() |
|
| 28 | + { |
|
| 29 | + $result = sprintf( |
|
| 30 | + '<li><a href="#" class="dropdown-item export-xml" data-format="xml">%s %s</a></li>', |
|
| 31 | + $this->getIconFactory()->getIcon('mimetypes-text-html', Icon::SIZE_SMALL), |
|
| 32 | + $this->getLanguageService()->sL('LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:export-xml') |
|
| 33 | + ); |
|
| 34 | + return $result; |
|
| 35 | + } |
|
| 36 | 36 | } |
@@ -16,13 +16,13 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | class DividerMenuItem extends AbstractComponentView |
| 18 | 18 | { |
| 19 | - /** |
|
| 20 | - * Renders a "divider" menu item to be placed in the grid menu. |
|
| 21 | - * |
|
| 22 | - * @return string |
|
| 23 | - */ |
|
| 24 | - public function render() |
|
| 25 | - { |
|
| 26 | - return ' <li><hr class="dropdown-divider"></li>'; |
|
| 27 | - } |
|
| 19 | + /** |
|
| 20 | + * Renders a "divider" menu item to be placed in the grid menu. |
|
| 21 | + * |
|
| 22 | + * @return string |
|
| 23 | + */ |
|
| 24 | + public function render() |
|
| 25 | + { |
|
| 26 | + return ' <li><hr class="dropdown-divider"></li>'; |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -17,18 +17,18 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | class MassEditMenuItem extends AbstractComponentView |
| 19 | 19 | { |
| 20 | - /** |
|
| 21 | - * Renders a "mass edit" menu item to be placed in the grid menu. |
|
| 22 | - * |
|
| 23 | - * @return string |
|
| 24 | - * @throws \InvalidArgumentException |
|
| 25 | - */ |
|
| 26 | - public function render() |
|
| 27 | - { |
|
| 28 | - return sprintf( |
|
| 29 | - '<li><a href="#" class="dropdown-item mass-edit">%s %s (not implemented)</a></li>', |
|
| 30 | - $this->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL), |
|
| 31 | - $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit') |
|
| 32 | - ); |
|
| 33 | - } |
|
| 20 | + /** |
|
| 21 | + * Renders a "mass edit" menu item to be placed in the grid menu. |
|
| 22 | + * |
|
| 23 | + * @return string |
|
| 24 | + * @throws \InvalidArgumentException |
|
| 25 | + */ |
|
| 26 | + public function render() |
|
| 27 | + { |
|
| 28 | + return sprintf( |
|
| 29 | + '<li><a href="#" class="dropdown-item mass-edit">%s %s (not implemented)</a></li>', |
|
| 30 | + $this->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL), |
|
| 31 | + $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit') |
|
| 32 | + ); |
|
| 33 | + } |
|
| 34 | 34 | } |