Skip to content

Commit

Permalink
[!!!][TASK] Apply latest core changes regarding interfaces location
Browse files Browse the repository at this point in the history
  • Loading branch information
o-ba committed Apr 17, 2020
1 parent 3669ac3 commit c8fadd7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 30 deletions.
17 changes: 4 additions & 13 deletions Classes/Widgets/ExtensionInformationWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

namespace Bo\CustomDashboardWidgets\Widgets;

use Bo\CustomDashboardWidgets\Widgets\Provider\ExtendedButtonProvider;
use TYPO3\CMS\Dashboard\Utility\ButtonUtility;
use TYPO3\CMS\Dashboard\Widgets\Interfaces\ButtonProviderInterface;
use TYPO3\CMS\Dashboard\Widgets\Interfaces\WidgetConfigurationInterface;
use TYPO3\CMS\Dashboard\Widgets\Interfaces\WidgetInterface;
use TYPO3\CMS\Dashboard\Widgets\ButtonProviderInterface;
use TYPO3\CMS\Dashboard\Widgets\WidgetConfigurationInterface;
use TYPO3\CMS\Dashboard\Widgets\WidgetInterface;
use TYPO3\CMS\Fluid\View\StandaloneView;

/**
Expand Down Expand Up @@ -54,17 +52,10 @@ public function renderWidgetContent(): string
$this->view->setTemplate('Widget/ExtensionInformationWidget');
$this->view->assignMultiple([
'configuration' => $this->configuration,
'button' => $this->getButtonConfiguration(),
'button' => $this->buttonProvider,
'options' => $this->options
]);

return $this->view->render();
}

private function getButtonConfiguration(): array
{
return $this->buttonProvider instanceof ExtendedButtonProvider
? $this->buttonProvider->getExtendedButtonConfiguration()
: ButtonUtility::generateButtonConfig($this->buttonProvider);
}
}
12 changes: 0 additions & 12 deletions Classes/Widgets/Provider/ExtendedButtonProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,4 @@ public function getIcon(): string
{
return $this->icon;
}

public function getExtendedButtonConfiguration(): array
{
return ($this->getTitle() === '' || $this->getLink() === '')
? []
: [
'text' => $this->getTitle(),
'link' => $this->getLink(),
'target' => $this->getTarget(),
'icon' => $this->getIcon()
];
}
}
2 changes: 1 addition & 1 deletion Classes/Widgets/Provider/LocalExtensionsDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Bo\CustomDashboardWidgets\Widgets\Provider;

use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Dashboard\Widgets\Interfaces\NumberWithIconDataProviderInterface;
use TYPO3\CMS\Dashboard\Widgets\NumberWithIconDataProviderInterface;
use TYPO3\CMS\Extensionmanager\Utility\ListUtility;

/**
Expand Down
2 changes: 1 addition & 1 deletion Classes/Widgets/Provider/TypeOfPagesChartDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Dashboard\WidgetApi;
use TYPO3\CMS\Dashboard\Widgets\Interfaces\ChartDataProviderInterface;
use TYPO3\CMS\Dashboard\Widgets\ChartDataProviderInterface;

/**
* Data provider for widget `typeOfPages`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<f:if condition="{button.icon}">
<core:icon identifier="{button.icon}" size="small" alternativeMarkupIdentifier="inline"/>&nbsp;
</f:if>
{f:translate(key: button.text, extensionName: 'customDashboardWidgets')}
{f:translate(id: button.title, default: button.title, extensionName: 'customDashboardWidgets')}
</a>
</f:if>
</f:section>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"typo3/cms-fluid": "^10.4"
},
"type": "typo3-cms-extension",
"version": "0.1.0",
"version": "0.2.0",
"autoload": {
"psr-4": {
"Bo\\CustomDashboardWidgets\\": "Classes"
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'author_company' => '',
'state' => 'beta',
'clearCacheOnLoad' => true,
'version' => '0.1.0',
'version' => '0.2.0',
'autoload' => [
'psr-4' => [
'Bo\\CustomDashboardWidgets\\' => 'Classes'
Expand Down

0 comments on commit c8fadd7

Please sign in to comment.