@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | private StandaloneView $view; |
| 25 | 25 | |
| 26 | 26 | |
| 27 | - public function __construct(WidgetConfigurationInterface $configuration, StandaloneView $view) |
|
| 27 | + public function __construct( WidgetConfigurationInterface $configuration, StandaloneView $view ) |
|
| 28 | 28 | { |
| 29 | 29 | $this->configuration = $configuration; |
| 30 | 30 | $this->view = $view; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function renderWidgetContent(): string |
| 46 | 46 | { |
| 47 | - return $this->view->assign('items', $this->getOrderItems())->render('Widgets/LatestOrdersWidget'); |
|
| 47 | + return $this->view->assign( 'items', $this->getOrderItems() )->render( 'Widgets/LatestOrdersWidget' ); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | |
@@ -56,15 +56,15 @@ discard block |
||
| 56 | 56 | protected function getOrderItems() : array |
| 57 | 57 | { |
| 58 | 58 | $config = \Aimeos\Aimeos\Base::config(); |
| 59 | - $context = \Aimeos\Aimeos\Base::context($config); |
|
| 59 | + $context = \Aimeos\Aimeos\Base::context( $config ); |
|
| 60 | 60 | |
| 61 | 61 | $manager = \Aimeos\MShop::create( $context, 'locale' ); |
| 62 | 62 | $item = $manager->bootstrap( 'default', '', '', true ); |
| 63 | 63 | $context->setLocale( $item ); |
| 64 | 64 | |
| 65 | - $manager = \Aimeos\MShop::create($context, 'order'); |
|
| 66 | - $filter = $manager->filter()->order('-order.id')->slice(0, 10); |
|
| 65 | + $manager = \Aimeos\MShop::create( $context, 'order' ); |
|
| 66 | + $filter = $manager->filter()->order( '-order.id' )->slice( 0, 10 ); |
|
| 67 | 67 | |
| 68 | - return $manager->search($filter, ['order/base/address'])->toArray(); |
|
| 68 | + return $manager->search( $filter, ['order/base/address'] )->toArray(); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | \ No newline at end of file |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -defined('TYPO3') or die(); |
|
| 3 | +defined( 'TYPO3' ) or die(); |
|
| 4 | 4 | |
| 5 | 5 | |
| 6 | -$aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('aimeos' ); |
|
| 6 | +$aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath( 'aimeos' ); |
|
| 7 | 7 | |
| 8 | -if (file_exists($aimeosExtPath . '/Resources/Libraries/autoload.php' ) === true ) { |
|
| 8 | +if( file_exists( $aimeosExtPath . '/Resources/Libraries/autoload.php' ) === true ) { |
|
| 9 | 9 | require_once $aimeosExtPath . '/Resources/Libraries/autoload.php'; |
| 10 | 10 | } |
| 11 | 11 | |
@@ -297,19 +297,19 @@ discard block |
||
| 297 | 297 | * Add cache configuration |
| 298 | 298 | */ |
| 299 | 299 | |
| 300 | -if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos'] ) ) { |
|
| 300 | +if( !isset( $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos'] ) ) { |
|
| 301 | 301 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos'] = []; |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | -if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['frontend'] ) ) { |
|
| 304 | +if( !isset( $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['frontend'] ) ) { |
|
| 305 | 305 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['frontend'] = 'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend'; |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | -if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['options'] ) ) { |
|
| 308 | +if( !isset( $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['options'] ) ) { |
|
| 309 | 309 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['options'] = ['defaultLifetime' => 0]; |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | -if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['groups'] ) ) { |
|
| 312 | +if( !isset( $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['groups'] ) ) { |
|
| 313 | 313 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['aimeos']['groups'] = ['pages']; |
| 314 | 314 | } |
| 315 | 315 | |
@@ -319,13 +319,13 @@ discard block |
||
| 319 | 319 | */ |
| 320 | 320 | |
| 321 | 321 | // TYPO3 10, unnecessary in 11 |
| 322 | -if (!isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['logout_confirmed']['aimeos'] ) ) { |
|
| 322 | +if( !isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['logout_confirmed']['aimeos'] ) ) { |
|
| 323 | 323 | $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['logout_confirmed']['aimeos'] = \Aimeos\Aimeos\Base::class . '->logout'; |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | -if (!isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['aimeos'] ) ) { |
|
| 327 | - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['aimeos'] = function(array $cacheType, $dataHandler ) { |
|
| 328 | - \Aimeos\Aimeos\Base::clearCache($cacheType ); |
|
| 326 | +if( !isset( $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['aimeos'] ) ) { |
|
| 327 | + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['aimeos'] = function( array $cacheType, $dataHandler ) { |
|
| 328 | + \Aimeos\Aimeos\Base::clearCache( $cacheType ); |
|
| 329 | 329 | }; |
| 330 | 330 | } |
| 331 | 331 | |
@@ -341,8 +341,8 @@ discard block |
||
| 341 | 341 | * Disable TYPO3 canonical tags so Aimeos ones are used |
| 342 | 342 | */ |
| 343 | 343 | |
| 344 | -if (!\Aimeos\Aimeos\Base::getExtConfig('typo3Canonical', false) ) { |
|
| 345 | - unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['canonical'] ); |
|
| 344 | +if( !\Aimeos\Aimeos\Base::getExtConfig( 'typo3Canonical', false ) ) { |
|
| 345 | + unset( $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['canonical'] ); |
|
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | |