@@ -3,16 +3,16 @@ |
||
3 | 3 | return array( |
4 | 4 | 'db' => array( |
5 | 5 | 'adapter' => 'mysql', |
6 | - 'host' => ( isset( $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] ) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['host'] ), |
|
7 | - 'port' => ( isset( $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port'] ) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['port'] ), |
|
8 | - 'socket' => ( isset( $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['socket'] ) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['socket'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['socket'] ), |
|
9 | - 'database' => ( isset( $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] ) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['database'] ), |
|
10 | - 'username' => ( isset( $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] ) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['username'] ), |
|
11 | - 'password' => ( isset( $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] ) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['password'] ), |
|
6 | + 'host' => (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['host']), |
|
7 | + 'port' => (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['port']), |
|
8 | + 'socket' => (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['socket']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['socket'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['socket']), |
|
9 | + 'database' => (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['database']), |
|
10 | + 'username' => (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['username']), |
|
11 | + 'password' => (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] : $GLOBALS['TYPO3_CONF_VARS']['DB']['password']), |
|
12 | 12 | 'stmt' => array("SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8'; SET SESSION sql_mode='ANSI'"), |
13 | 13 | 'defaultTableOptions' => array( |
14 | - 'charset' => ( isset( $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions']['charset'] ) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions']['charset'] : 'utf8' ), |
|
15 | - 'collate' => ( isset( $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions']['collate'] ) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions']['collate'] : 'utf8_bin' ), |
|
14 | + 'charset' => (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions']['charset']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions']['charset'] : 'utf8'), |
|
15 | + 'collate' => (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions']['collate']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['tableoptions']['collate'] : 'utf8_bin'), |
|
16 | 16 | ), |
17 | 17 | 'limit' => 2, |
18 | 18 | ), |
@@ -28,19 +28,19 @@ discard block |
||
28 | 28 | * @param array Input array with wizard items for plugins |
29 | 29 | * @return array Modified input array, having the item for Aimeos added. |
30 | 30 | */ |
31 | - public function proc( $wizardItems ) |
|
31 | + public function proc($wizardItems) |
|
32 | 32 | { |
33 | - $path = ExtensionManagementUtility::extPath( 'aimeos' ); |
|
34 | - $relpath = ExtensionManagementUtility::siteRelPath( 'aimeos' ); |
|
33 | + $path = ExtensionManagementUtility::extPath('aimeos'); |
|
34 | + $relpath = ExtensionManagementUtility::siteRelPath('aimeos'); |
|
35 | 35 | $langfile = $path . 'Resources/Private/Language/extension.xlf'; |
36 | 36 | |
37 | - $languageFactory = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Localization\LocalizationFactory' ); |
|
38 | - $xml = $languageFactory->getParsedData( $langfile, $GLOBALS['LANG']->lang, '', 0 ); |
|
37 | + $languageFactory = GeneralUtility::makeInstance('TYPO3\CMS\Core\Localization\LocalizationFactory'); |
|
38 | + $xml = $languageFactory->getParsedData($langfile, $GLOBALS['LANG']->lang, '', 0); |
|
39 | 39 | |
40 | 40 | $wizardItems['plugins_tx_aimeos'] = array( |
41 | 41 | 'icon' => $relpath . 'Resources/Public/Icons/Extension.svg', |
42 | - 'title' => $GLOBALS['LANG']->getLLL( 'ext-wizard-title', $xml ), |
|
43 | - 'description' => $GLOBALS['LANG']->getLLL( 'ext-wizard-description', $xml ), |
|
42 | + 'title' => $GLOBALS['LANG']->getLLL('ext-wizard-title', $xml), |
|
43 | + 'description' => $GLOBALS['LANG']->getLLL('ext-wizard-description', $xml), |
|
44 | 44 | 'params' => '&defVals[tt_content][CType]=list' |
45 | 45 | ); |
46 | 46 | |
@@ -49,6 +49,6 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | -if( defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/aimeos/Classes/Custom/Wizicon.php'] ) { |
|
53 | - include_once( $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/aimeos/Classes/Custom/Wizicon.php'] ); |
|
52 | +if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/aimeos/Classes/Custom/Wizicon.php']) { |
|
53 | + include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/aimeos/Classes/Custom/Wizicon.php']); |
|
54 | 54 | } |
@@ -23,33 +23,33 @@ discard block |
||
23 | 23 | * @param \Composer\Script\Event $event Event instance |
24 | 24 | * @throws \RuntimeException If an error occured |
25 | 25 | */ |
26 | - public static function install( \Composer\Script\Event $event ) |
|
26 | + public static function install(\Composer\Script\Event $event) |
|
27 | 27 | { |
28 | 28 | $repository = $event->getComposer()->getRepositoryManager()->getLocalRepository(); |
29 | 29 | |
30 | - if( ( $t3package = $repository->findPackage( 'aimeos/aimeos-typo3', '*' ) ) === null |
|
31 | - && ( $t3package = $repository->findPackage( 'typo3-ter/aimeos-typo3', '*' ) ) === null |
|
30 | + if (($t3package = $repository->findPackage('aimeos/aimeos-typo3', '*')) === null |
|
31 | + && ($t3package = $repository->findPackage('typo3-ter/aimeos-typo3', '*')) === null |
|
32 | 32 | ) { |
33 | - throw new \RuntimeException( 'No installed package "aimeos/aimeos-typo3" or "typo3-ter/aimeos-typo3" found' ); |
|
33 | + throw new \RuntimeException('No installed package "aimeos/aimeos-typo3" or "typo3-ter/aimeos-typo3" found'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | $installer = $event->getComposer()->getInstallationManager(); |
37 | - $t3path = $installer->getInstallPath( $t3package ); |
|
37 | + $t3path = $installer->getInstallPath($t3package); |
|
38 | 38 | |
39 | - if( ( $package = $repository->findPackage( 'aimeos/ai-client-html', '*' ) ) !== null ) |
|
39 | + if (($package = $repository->findPackage('aimeos/ai-client-html', '*')) !== null) |
|
40 | 40 | { |
41 | - $event->getIO()->write( 'Installing Aimeos public files from HTML client' ); |
|
41 | + $event->getIO()->write('Installing Aimeos public files from HTML client'); |
|
42 | 42 | |
43 | - $path = $installer->getInstallPath( $package ); |
|
44 | - self::copyRecursive( $path . '/client/html/themes', $t3path . '/Resources/Public/Themes' ); |
|
43 | + $path = $installer->getInstallPath($package); |
|
44 | + self::copyRecursive($path . '/client/html/themes', $t3path . '/Resources/Public/Themes'); |
|
45 | 45 | } |
46 | 46 | |
47 | - if( ( $package = $repository->findPackage( 'aimeos/ai-typo3', '*' ) ) !== null ) |
|
47 | + if (($package = $repository->findPackage('aimeos/ai-typo3', '*')) !== null) |
|
48 | 48 | { |
49 | - $event->getIO()->write( 'Creating symlink to Aimeos extension directory' ); |
|
49 | + $event->getIO()->write('Creating symlink to Aimeos extension directory'); |
|
50 | 50 | |
51 | - $path = dirname( $installer->getInstallPath( $package ) ); |
|
52 | - self::createLink( '../../../../../../' . $path, $t3path . '/Resources/Private/Extensions' ); |
|
51 | + $path = dirname($installer->getInstallPath($package)); |
|
52 | + self::createLink('../../../../../../' . $path, $t3path . '/Resources/Private/Extensions'); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
@@ -61,28 +61,28 @@ discard block |
||
61 | 61 | * @param string $dest Target directory path |
62 | 62 | * @throws \RuntimeException If an error occured |
63 | 63 | */ |
64 | - protected static function copyRecursive( $src, $dest ) |
|
64 | + protected static function copyRecursive($src, $dest) |
|
65 | 65 | { |
66 | - self::createDirectory( $dest ); |
|
66 | + self::createDirectory($dest); |
|
67 | 67 | |
68 | 68 | $iterator = new \RecursiveIteratorIterator( |
69 | - new \RecursiveDirectoryIterator( $src, \RecursiveDirectoryIterator::SKIP_DOTS ), |
|
69 | + new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), |
|
70 | 70 | \RecursiveIteratorIterator::SELF_FIRST |
71 | 71 | ); |
72 | 72 | |
73 | - foreach( $iterator as $item ) |
|
73 | + foreach ($iterator as $item) |
|
74 | 74 | { |
75 | 75 | $target = $dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName(); |
76 | 76 | |
77 | - if( $item->isDir() === false ) |
|
77 | + if ($item->isDir() === false) |
|
78 | 78 | { |
79 | - if( copy( $item, $target ) === false ) { |
|
80 | - throw new \RuntimeException( sprintf( 'Unable to copy file "%1$s"', $item ) ); |
|
79 | + if (copy($item, $target) === false) { |
|
80 | + throw new \RuntimeException(sprintf('Unable to copy file "%1$s"', $item)); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | else |
84 | 84 | { |
85 | - self::createDirectory( $target ); |
|
85 | + self::createDirectory($target); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | } |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | * @param string $dir Absolute path of the new directory |
95 | 95 | * @throws \RuntimeException If directory couldn't be created |
96 | 96 | */ |
97 | - protected static function createDirectory( $dir ) |
|
97 | + protected static function createDirectory($dir) |
|
98 | 98 | { |
99 | 99 | $perm = 0755; |
100 | 100 | |
101 | - if( is_dir( $dir ) === false && mkdir( $dir, $perm, true ) === false ) |
|
101 | + if (is_dir($dir) === false && mkdir($dir, $perm, true) === false) |
|
102 | 102 | { |
103 | 103 | $msg = 'Unable to create directory "%1$s" with permission "%2$s"'; |
104 | - throw new \RuntimeException( sprintf( $msg, $dir, $perm ) ); |
|
104 | + throw new \RuntimeException(sprintf($msg, $dir, $perm)); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
@@ -112,14 +112,14 @@ discard block |
||
112 | 112 | * @param string $source Relative source path |
113 | 113 | * @param string $target Absolute target path |
114 | 114 | */ |
115 | - protected static function createLink( $source, $target ) |
|
115 | + protected static function createLink($source, $target) |
|
116 | 116 | { |
117 | - if( file_exists( $target ) === false && @symlink( $source, $target ) === false ) |
|
117 | + if (file_exists($target) === false && @symlink($source, $target) === false) |
|
118 | 118 | { |
119 | - $source = realpath( __DIR__ . '/' . $source ); |
|
119 | + $source = realpath(__DIR__ . '/' . $source); |
|
120 | 120 | |
121 | - if( symlink( $source, $target ) === false ) { |
|
122 | - throw new \RuntimeException( sprintf( 'Failed to create symlink for "%1$s" to "%2$s"', $source, $target ) ); |
|
121 | + if (symlink($source, $target) === false) { |
|
122 | + throw new \RuntimeException(sprintf('Failed to create symlink for "%1$s" to "%2$s"', $source, $target)); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * @param CommandEvent $event Command event object |
132 | 132 | * @return array Associative list of option keys and values |
133 | 133 | */ |
134 | - protected static function getOptions( CommandEvent $event ) |
|
134 | + protected static function getOptions(CommandEvent $event) |
|
135 | 135 | { |
136 | 136 | return $event->getComposer()->getPackage()->getExtra(); |
137 | 137 | } |
@@ -79,8 +79,7 @@ |
||
79 | 79 | if( copy( $item, $target ) === false ) { |
80 | 80 | throw new \RuntimeException( sprintf( 'Unable to copy file "%1$s"', $item ) ); |
81 | 81 | } |
82 | - } |
|
83 | - else |
|
82 | + } else |
|
84 | 83 | { |
85 | 84 | self::createDirectory( $target ); |
86 | 85 | } |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | * @param tx_realurl_autoconfgen $pObj Parent object |
26 | 26 | * @return array Updated configuration |
27 | 27 | */ |
28 | - public function addAutoConfig( $params, &$pObj ) |
|
28 | + public function addAutoConfig($params, &$pObj) |
|
29 | 29 | { |
30 | 30 | $params['config']['init']['emptySegmentValue'] = ''; |
31 | 31 | |
32 | - return array_merge_recursive( $params['config'], array( |
|
32 | + return array_merge_recursive($params['config'], array( |
|
33 | 33 | 'postVarSets' => array( |
34 | 34 | '_DEFAULT' => array( |
35 | 35 | 'aimeos' => array( |
@@ -43,58 +43,58 @@ discard block |
||
43 | 43 | ), |
44 | 44 | ), |
45 | 45 | 'f' => array( |
46 | - array( 'GETvar' => 'ai[f_name]' ), |
|
47 | - array( 'GETvar' => 'ai[f_catid]' ), |
|
46 | + array('GETvar' => 'ai[f_name]'), |
|
47 | + array('GETvar' => 'ai[f_catid]'), |
|
48 | 48 | ), |
49 | 49 | 's' => array( |
50 | - array( 'GETvar' => 'ai[f_sort]' ), |
|
50 | + array('GETvar' => 'ai[f_sort]'), |
|
51 | 51 | ), |
52 | 52 | 'l' => array( |
53 | - array( 'GETvar' => 'ai[l_page]' ), |
|
54 | - array( 'GETvar' => 'ai[l_size]' ), |
|
53 | + array('GETvar' => 'ai[l_page]'), |
|
54 | + array('GETvar' => 'ai[l_size]'), |
|
55 | 55 | ), |
56 | 56 | 'd' => array( |
57 | - array( 'GETvar' => 'ai[d_name]' ), |
|
58 | - array( 'GETvar' => 'ai[d_pos]' ), |
|
57 | + array('GETvar' => 'ai[d_name]'), |
|
58 | + array('GETvar' => 'ai[d_pos]'), |
|
59 | 59 | ), |
60 | 60 | 'fs' => array( |
61 | - array( 'GETvar' => 'ai[f_search]' ), |
|
61 | + array('GETvar' => 'ai[f_search]'), |
|
62 | 62 | ), |
63 | 63 | 'fa' => array( |
64 | - array( 'GETvar' => 'ai[f_attrid]' ), |
|
64 | + array('GETvar' => 'ai[f_attrid]'), |
|
65 | 65 | ), |
66 | 66 | 'pin' => array( |
67 | - array( 'GETvar' => 'ai[pin_action]' ), |
|
68 | - array( 'GETvar' => 'ai[pin_id]' ), |
|
67 | + array('GETvar' => 'ai[pin_action]'), |
|
68 | + array('GETvar' => 'ai[pin_id]'), |
|
69 | 69 | ), |
70 | 70 | 'fav' => array( |
71 | - array( 'GETvar' => 'ai[fav_action]' ), |
|
72 | - array( 'GETvar' => 'ai[fav_id]' ), |
|
71 | + array('GETvar' => 'ai[fav_action]'), |
|
72 | + array('GETvar' => 'ai[fav_id]'), |
|
73 | 73 | ), |
74 | 74 | 'watch' => array( |
75 | - array( 'GETvar' => 'ai[wat_action]' ), |
|
76 | - array( 'GETvar' => 'ai[wat_id]' ), |
|
75 | + array('GETvar' => 'ai[wat_action]'), |
|
76 | + array('GETvar' => 'ai[wat_id]'), |
|
77 | 77 | ), |
78 | 78 | 'history' => array( |
79 | - array( 'GETvar' => 'ai[his_action]' ), |
|
80 | - array( 'GETvar' => 'ai[his_id]' ), |
|
79 | + array('GETvar' => 'ai[his_action]'), |
|
80 | + array('GETvar' => 'ai[his_id]'), |
|
81 | 81 | ), |
82 | 82 | 'bt' => array( |
83 | - array( 'GETvar' => 'ai[b_action]' ), |
|
84 | - array( 'GETvar' => 'ai[b_position]' ), |
|
85 | - array( 'GETvar' => 'ai[b_quantity]' ), |
|
83 | + array('GETvar' => 'ai[b_action]'), |
|
84 | + array('GETvar' => 'ai[b_position]'), |
|
85 | + array('GETvar' => 'ai[b_quantity]'), |
|
86 | 86 | ), |
87 | 87 | 'co' => array( |
88 | - array( 'GETvar' => 'ai[c_step]' ), |
|
88 | + array('GETvar' => 'ai[c_step]'), |
|
89 | 89 | ), |
90 | 90 | 'cc' => array( |
91 | - array( 'GETvar' => 'code' ), |
|
91 | + array('GETvar' => 'code'), |
|
92 | 92 | ), |
93 | 93 | 'r' => array( |
94 | - array( 'GETvar' => 'ai[resource]' ), |
|
95 | - array( 'GETvar' => 'ai[id]' ), |
|
96 | - array( 'GETvar' => 'ai[related]' ), |
|
97 | - array( 'GETvar' => 'ai[relatedid]' ), |
|
94 | + array('GETvar' => 'ai[resource]'), |
|
95 | + array('GETvar' => 'ai[id]'), |
|
96 | + array('GETvar' => 'ai[related]'), |
|
97 | + array('GETvar' => 'ai[relatedid]'), |
|
98 | 98 | ), |
99 | 99 | 'js' => array( |
100 | 100 | 'type' => 'single', |
@@ -110,6 +110,6 @@ discard block |
||
110 | 110 | ), |
111 | 111 | ), |
112 | 112 | ), |
113 | - ) ); |
|
113 | + )); |
|
114 | 114 | } |
115 | 115 | } |
@@ -15,15 +15,15 @@ |
||
15 | 15 | |
16 | 16 | class WizardItem implements NewContentElementWizardHookInterface |
17 | 17 | { |
18 | - public function manipulateWizardItems( &$wizardItems, &$parentObject ) |
|
18 | + public function manipulateWizardItems(&$wizardItems, &$parentObject) |
|
19 | 19 | { |
20 | - if( isset( $wizardItems['plugins_tx_aimeos'] ) && isset( $wizardItems['plugins_tx_aimeos']['icon'] ) ) |
|
20 | + if (isset($wizardItems['plugins_tx_aimeos']) && isset($wizardItems['plugins_tx_aimeos']['icon'])) |
|
21 | 21 | { |
22 | - $iconRegistry = GeneralUtility::makeInstance( 'TYPO3\\CMS\\Core\\Imaging\\IconRegistry' ); |
|
22 | + $iconRegistry = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Imaging\\IconRegistry'); |
|
23 | 23 | $iconRegistry->registerIcon( |
24 | 24 | 'tx-aimeos-wizicon', |
25 | 25 | 'TYPO3\\CMS\\Core\\Imaging\\IconProvider\\SvgIconProvider', |
26 | - array( 'source' => 'EXT:aimeos/Resources/Public/Icons/Extension.svg' ) |
|
26 | + array('source' => 'EXT:aimeos/Resources/Public/Icons/Extension.svg') |
|
27 | 27 | ); |
28 | 28 | |
29 | 29 | $wizardItems['plugins_tx_aimeos']['iconIdentifier'] = 'tx-aimeos-wizicon'; |
@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | use \TYPO3\CMS\Core\Utility\GeneralUtility; |
14 | 14 | |
15 | 15 | |
16 | -$localautoloader = dirname( __DIR__ ) . '/Resources/Libraries/autoload.php'; |
|
16 | +$localautoloader = dirname(__DIR__) . '/Resources/Libraries/autoload.php'; |
|
17 | 17 | |
18 | -if( file_exists( $localautoloader ) === true ) { |
|
18 | +if (file_exists($localautoloader) === true) { |
|
19 | 19 | require_once $localautoloader; |
20 | 20 | } |
21 | 21 | |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | { |
40 | 40 | $name = 'Aimeos\Aimeos\Base\Aimeos'; |
41 | 41 | |
42 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos'] ) ) { |
|
43 | - if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos'] ) instanceof \Closure ) { |
|
42 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos'])) { |
|
43 | + if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos']) instanceof \Closure) { |
|
44 | 44 | return $name(); |
45 | 45 | } |
46 | 46 | } |
@@ -55,17 +55,17 @@ discard block |
||
55 | 55 | * @param array $local Multi-dimensional associative list with local configuration |
56 | 56 | * @return \Aimeos\MW\Config\Iface Configuration object |
57 | 57 | */ |
58 | - public static function getConfig( array $local = array() ) |
|
58 | + public static function getConfig(array $local = array()) |
|
59 | 59 | { |
60 | 60 | $name = 'Aimeos\Aimeos\Base\Config'; |
61 | 61 | |
62 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_config'] ) ) { |
|
63 | - if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_config'] ) instanceof \Closure ) { |
|
64 | - return $name( self::getAimeos()->getConfigPaths(), $local ); |
|
62 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_config'])) { |
|
63 | + if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_config']) instanceof \Closure) { |
|
64 | + return $name(self::getAimeos()->getConfigPaths(), $local); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
68 | - return $name::get( self::getAimeos()->getConfigPaths(), $local ); |
|
68 | + return $name::get(self::getAimeos()->getConfigPaths(), $local); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
@@ -75,17 +75,17 @@ discard block |
||
75 | 75 | * @param \Aimeos\MW\Config\Iface Configuration object |
76 | 76 | * @return \Aimeos\MShop\Context\Item\Iface Context object |
77 | 77 | */ |
78 | - public static function getContext( \Aimeos\MW\Config\Iface $config ) |
|
78 | + public static function getContext(\Aimeos\MW\Config\Iface $config) |
|
79 | 79 | { |
80 | 80 | $name = 'Aimeos\Aimeos\Base\Context'; |
81 | 81 | |
82 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context'] ) ) { |
|
83 | - if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context'] ) instanceof \Closure ) { |
|
84 | - return $name( $config ); |
|
82 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context'])) { |
|
83 | + if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context']) instanceof \Closure) { |
|
84 | + return $name($config); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
88 | - return $name::get( $config ); |
|
88 | + return $name::get($config); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | |
@@ -96,18 +96,18 @@ discard block |
||
96 | 96 | * @param mixed Value returned if no value in extension configuration was found |
97 | 97 | * @return mixed Value associated with the configuration setting |
98 | 98 | */ |
99 | - public static function getExtConfig( $name, $default = null ) |
|
99 | + public static function getExtConfig($name, $default = null) |
|
100 | 100 | { |
101 | - if( self::$extConfig === null ) |
|
101 | + if (self::$extConfig === null) |
|
102 | 102 | { |
103 | - if( class_exists( '\TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ) ) { |
|
104 | - self::$extConfig = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Configuration\ExtensionConfiguration' )->get( 'aimeos' ); |
|
103 | + if (class_exists('\TYPO3\CMS\Core\Configuration\ExtensionConfiguration')) { |
|
104 | + self::$extConfig = GeneralUtility::makeInstance('TYPO3\CMS\Core\Configuration\ExtensionConfiguration')->get('aimeos'); |
|
105 | 105 | } else { // @deprecated Since TYPO3 9.x |
106 | - self::$extConfig = unserialize( $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['aimeos'] ); |
|
106 | + self::$extConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['aimeos']); |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | - if( isset( self::$extConfig[$name] ) ) { |
|
110 | + if (isset(self::$extConfig[$name])) { |
|
111 | 111 | return self::$extConfig[$name]; |
112 | 112 | } |
113 | 113 | |
@@ -122,17 +122,17 @@ discard block |
||
122 | 122 | * @param array $local List of local translation entries overwriting the standard ones |
123 | 123 | * @return array List of translation objects implementing MW_Translation_Interface |
124 | 124 | */ |
125 | - public static function getI18n( array $languageIds, array $local = array() ) |
|
125 | + public static function getI18n(array $languageIds, array $local = array()) |
|
126 | 126 | { |
127 | 127 | $name = 'Aimeos\Aimeos\Base\I18n'; |
128 | 128 | |
129 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_i18n'] ) ) { |
|
130 | - if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_i18n'] ) instanceof \Closure ) { |
|
131 | - return $name( self::getAimeos()->getI18nPaths(), $languageIds, $local ); |
|
129 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_i18n'])) { |
|
130 | + if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_i18n']) instanceof \Closure) { |
|
131 | + return $name(self::getAimeos()->getI18nPaths(), $languageIds, $local); |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | |
135 | - return $name::get( self::getAimeos()->getI18nPaths(), $languageIds, $local ); |
|
135 | + return $name::get(self::getAimeos()->getI18nPaths(), $languageIds, $local); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | |
@@ -143,21 +143,21 @@ discard block |
||
143 | 143 | * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object |
144 | 144 | * @return \Aimeos\MShop\Locale\Item\Iface Locale item object |
145 | 145 | */ |
146 | - public static function getLocale( \Aimeos\MShop\Context\Item\Iface $context, \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null ) |
|
146 | + public static function getLocale(\Aimeos\MShop\Context\Item\Iface $context, \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null) |
|
147 | 147 | { |
148 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_frontend'] ) ) { |
|
149 | - if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_frontend'] ) instanceof \Closure ) { |
|
150 | - return $name( $context, $request ); |
|
148 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_frontend'])) { |
|
149 | + if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_frontend']) instanceof \Closure) { |
|
150 | + return $name($context, $request); |
|
151 | 151 | } |
152 | 152 | } |
153 | 153 | |
154 | 154 | $name = 'Aimeos\Aimeos\Base\Locale'; |
155 | 155 | |
156 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'] ) ) { |
|
156 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'])) { |
|
157 | 157 | $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale']; |
158 | 158 | } |
159 | 159 | |
160 | - return $name::get( $context, $request ); |
|
160 | + return $name::get($context, $request); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | |
@@ -168,21 +168,21 @@ discard block |
||
168 | 168 | * @param string $sitecode Unique site code |
169 | 169 | * @return \Aimeos\MShop\Locale\Item\Iface Locale item object |
170 | 170 | */ |
171 | - public static function getLocaleBackend( \Aimeos\MShop\Context\Item\Iface $context, $sitecode ) |
|
171 | + public static function getLocaleBackend(\Aimeos\MShop\Context\Item\Iface $context, $sitecode) |
|
172 | 172 | { |
173 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_backend'] ) ) { |
|
174 | - if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_backend'] ) instanceof \Closure ) { |
|
175 | - return $name( $context, $sitecode ); |
|
173 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_backend'])) { |
|
174 | + if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_backend']) instanceof \Closure) { |
|
175 | + return $name($context, $sitecode); |
|
176 | 176 | } |
177 | 177 | } |
178 | 178 | |
179 | 179 | $name = 'Aimeos\Aimeos\Base\Locale'; |
180 | 180 | |
181 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'] ) ) { |
|
181 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'])) { |
|
182 | 182 | $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale']; |
183 | 183 | } |
184 | 184 | |
185 | - return $name::getBackend( $context, $sitecode ); |
|
185 | + return $name::getBackend($context, $sitecode); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | |
@@ -194,9 +194,9 @@ discard block |
||
194 | 194 | public static function getVersion() |
195 | 195 | { |
196 | 196 | $match = array(); |
197 | - $content = @file_get_contents( dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'ext_emconf.php' ); |
|
197 | + $content = @file_get_contents(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'ext_emconf.php'); |
|
198 | 198 | |
199 | - if( preg_match( "/'version' => '([^']+)'/", $content, $match ) === 1 ) { |
|
199 | + if (preg_match("/'version' => '([^']+)'/", $content, $match) === 1) { |
|
200 | 200 | return $match[1]; |
201 | 201 | } |
202 | 202 | |
@@ -214,19 +214,19 @@ discard block |
||
214 | 214 | * @param string|null $langid ISO code of the current language ("de"/"de_CH") or null for no translation |
215 | 215 | * @return \Aimeos\MW\View\Iface View object |
216 | 216 | */ |
217 | - public static function getView( \Aimeos\MShop\Context\Item\Iface $context, |
|
217 | + public static function getView(\Aimeos\MShop\Context\Item\Iface $context, |
|
218 | 218 | \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder $uriBuilder, array $templatePaths, |
219 | - \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null, $langid = null ) |
|
219 | + \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null, $langid = null) |
|
220 | 220 | { |
221 | 221 | $name = 'Aimeos\Aimeos\Base\View'; |
222 | 222 | |
223 | - if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view'] ) ) { |
|
224 | - if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view'] ) instanceof \Closure ) { |
|
225 | - return $name( $context, $uriBuilder, $templatePaths, $request, $langid ); |
|
223 | + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view'])) { |
|
224 | + if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view']) instanceof \Closure) { |
|
225 | + return $name($context, $uriBuilder, $templatePaths, $request, $langid); |
|
226 | 226 | } |
227 | 227 | } |
228 | 228 | |
229 | - return $name::get( $context, $uriBuilder, $templatePaths, $request, $langid ); |
|
229 | + return $name::get($context, $uriBuilder, $templatePaths, $request, $langid); |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | |
@@ -237,24 +237,24 @@ discard block |
||
237 | 237 | * @return array Mulit-dimensional, associative list of key/value pairs |
238 | 238 | * @throws Exception If parsing the configuration string fails |
239 | 239 | */ |
240 | - public static function parseTS( $tsString ) |
|
240 | + public static function parseTS($tsString) |
|
241 | 241 | { |
242 | - $parser = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser' ); |
|
243 | - $parser->parse( $tsString ); |
|
242 | + $parser = GeneralUtility::makeInstance('TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser'); |
|
243 | + $parser->parse($tsString); |
|
244 | 244 | |
245 | - if( !empty( $parser->errors ) ) { |
|
246 | - throw new \InvalidArgumentException( 'Invalid TypoScript: \"' . $tsString . "\"\n" . print_r( $parser->errors, true ) ); |
|
245 | + if (!empty($parser->errors)) { |
|
246 | + throw new \InvalidArgumentException('Invalid TypoScript: \"' . $tsString . "\"\n" . print_r($parser->errors, true)); |
|
247 | 247 | } |
248 | 248 | |
249 | - $service = GeneralUtility::makeInstance( 'TYPO3\CMS\Extbase\Service\TypoScriptService' ); |
|
250 | - $tsConfig = $service->convertTypoScriptArrayToPlainArray( $parser->setup ); |
|
249 | + $service = GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Service\TypoScriptService'); |
|
250 | + $tsConfig = $service->convertTypoScriptArrayToPlainArray($parser->setup); |
|
251 | 251 | |
252 | 252 | // Allows "plugin.tx_aimeos.settings." prefix everywhere |
253 | - if( isset( $tsConfig['plugin']['tx_aimeos']['settings'] ) |
|
254 | - && is_array( $tsConfig['plugin']['tx_aimeos']['settings'] ) |
|
253 | + if (isset($tsConfig['plugin']['tx_aimeos']['settings']) |
|
254 | + && is_array($tsConfig['plugin']['tx_aimeos']['settings']) |
|
255 | 255 | ) { |
256 | - $tsConfig = array_replace_recursive( $tsConfig['plugin']['tx_aimeos']['settings'], $tsConfig ); |
|
257 | - unset( $tsConfig['plugin']['tx_aimeos'] ); |
|
256 | + $tsConfig = array_replace_recursive($tsConfig['plugin']['tx_aimeos']['settings'], $tsConfig); |
|
257 | + unset($tsConfig['plugin']['tx_aimeos']); |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | return $tsConfig; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function selectAction() |
28 | 28 | { |
29 | - $client = \Aimeos\Client\Html::create( $this->getContext(), 'locale/select' ); |
|
30 | - return $this->getClientOutput( $client ); |
|
29 | + $client = \Aimeos\Client\Html::create($this->getContext(), 'locale/select'); |
|
30 | + return $this->getClientOutput($client); |
|
31 | 31 | } |
32 | 32 | } |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function indexAction() |
28 | 28 | { |
29 | - $client = \Aimeos\Client\Html::create( $this->getContext(), 'basket/standard' ); |
|
30 | - return $this->getClientOutput( $client ); |
|
29 | + $client = \Aimeos\Client\Html::create($this->getContext(), 'basket/standard'); |
|
30 | + return $this->getClientOutput($client); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function smallAction() |
38 | 38 | { |
39 | - $client = \Aimeos\Client\Html::create( $this->getContext(), 'basket/mini' ); |
|
40 | - return $this->getClientOutput( $client ); |
|
39 | + $client = \Aimeos\Client\Html::create($this->getContext(), 'basket/mini'); |
|
40 | + return $this->getClientOutput($client); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function relatedAction() |
48 | 48 | { |
49 | - $client = \Aimeos\Client\Html::create( $this->getContext(), 'basket/related' ); |
|
50 | - return $this->getClientOutput( $client ); |
|
49 | + $client = \Aimeos\Client\Html::create($this->getContext(), 'basket/related'); |
|
50 | + return $this->getClientOutput($client); |
|
51 | 51 | } |
52 | 52 | } |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function indexAction() |
28 | 28 | { |
29 | - $client = \Aimeos\Client\Html::create( $this->getContext(), 'checkout/standard' ); |
|
30 | - return $this->getClientOutput( $client ); |
|
29 | + $client = \Aimeos\Client\Html::create($this->getContext(), 'checkout/standard'); |
|
30 | + return $this->getClientOutput($client); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -37,17 +37,17 @@ discard block |
||
37 | 37 | public function confirmAction() |
38 | 38 | { |
39 | 39 | $context = $this->getContext(); |
40 | - $client = \Aimeos\Client\Html::create( $context, 'checkout/confirm' ); |
|
40 | + $client = \Aimeos\Client\Html::create($context, 'checkout/confirm'); |
|
41 | 41 | |
42 | 42 | $view = $context->getView(); |
43 | - $param = array_merge( \TYPO3\CMS\Core\Utility\GeneralUtility::_GET(), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST() ); |
|
44 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param ); |
|
45 | - $view->addHelper( 'param', $helper ); |
|
43 | + $param = array_merge(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET(), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST()); |
|
44 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $param); |
|
45 | + $view->addHelper('param', $helper); |
|
46 | 46 | |
47 | - $client->setView( $view ); |
|
47 | + $client->setView($view); |
|
48 | 48 | $client->process(); |
49 | 49 | |
50 | - $this->response->addAdditionalHeaderData( (string) $client->getHeader() ); |
|
50 | + $this->response->addAdditionalHeaderData((string) $client->getHeader()); |
|
51 | 51 | |
52 | 52 | return $client->getBody(); |
53 | 53 | } |
@@ -61,23 +61,23 @@ discard block |
||
61 | 61 | try |
62 | 62 | { |
63 | 63 | $context = $this->getContext(); |
64 | - $client = \Aimeos\Client\Html::create( $context, 'checkout/update' ); |
|
64 | + $client = \Aimeos\Client\Html::create($context, 'checkout/update'); |
|
65 | 65 | |
66 | 66 | $view = $context->getView(); |
67 | - $param = array_merge( \TYPO3\CMS\Core\Utility\GeneralUtility::_GET(), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST() ); |
|
68 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param ); |
|
69 | - $view->addHelper( 'param', $helper ); |
|
67 | + $param = array_merge(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET(), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST()); |
|
68 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $param); |
|
69 | + $view->addHelper('param', $helper); |
|
70 | 70 | |
71 | - $client->setView( $view ); |
|
71 | + $client->setView($view); |
|
72 | 72 | $client->process(); |
73 | 73 | |
74 | - $this->response->addAdditionalHeaderData( (string) $client->getHeader() ); |
|
74 | + $this->response->addAdditionalHeaderData((string) $client->getHeader()); |
|
75 | 75 | |
76 | 76 | return $client->getBody(); |
77 | 77 | } |
78 | - catch( \Exception $e ) |
|
78 | + catch (\Exception $e) |
|
79 | 79 | { |
80 | - @header( 'HTTP/1.1 500 Internal server error', true, 500 ); |
|
80 | + @header('HTTP/1.1 500 Internal server error', true, 500); |
|
81 | 81 | return 'Error: ' . $e->getMessage(); |
82 | 82 | } |
83 | 83 | } |
@@ -74,8 +74,7 @@ |
||
74 | 74 | $this->response->addAdditionalHeaderData( (string) $client->getHeader() ); |
75 | 75 | |
76 | 76 | return $client->getBody(); |
77 | - } |
|
78 | - catch( \Exception $e ) |
|
77 | + } catch( \Exception $e ) |
|
79 | 78 | { |
80 | 79 | @header( 'HTTP/1.1 500 Internal server error', true, 500 ); |
81 | 80 | return 'Error: ' . $e->getMessage(); |