This repository was archived by the owner on Aug 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-54
lines changed
Expand file tree Collapse file tree 2 files changed +8
-54
lines changed Original file line number Diff line number Diff line change 2525 ***************************************************************/
2626
2727use TYPO3 \CMS \Extbase \Mvc \Controller \CommandController ;
28+ use TYPO3 \CMS \Extbase \Reflection \ObjectAccess ;
2829
2930/**
3031 * Configuration API Command Controller
3536class ConfigurationApiCommandController extends CommandController {
3637
3738 /**
38- * @var \Etobi\CoreAPI\Service\ConfigurationApiService
39- * @inject
40- */
41- protected $ configurationApiService ;
42-
43- /**
44- * List all configurations
39+ * listCommand
4540 *
4641 * @return string
4742 */
4843 public function listCommand () {
49- $ this ->outputLine (json_encode ($ this ->configurationApiService ->getConfigurationArray ()));
44+ $ typo3ConfVars = $ GLOBALS ['TYPO3_CONF_VARS ' ];
45+ $ this ->outputLine (json_encode ($ typo3ConfVars ));
5046 }
5147
5248 /**
53- * Get configuration value for given key
49+ * showCommand
5450 *
55- * @param string $key
51+ * @param string $param
5652 * @return string
5753 */
5854 public function showCommand ($ key ) {
59- $ this ->outputLine (json_encode ($ this ->configurationApiService ->getValue ($ key )));
55+ $ typo3ConfVars = ObjectAccess::getPropertyPath ($ GLOBALS ['TYPO3_CONF_VARS ' ], $ key );
56+ $ this ->outputLine (json_encode ($ typo3ConfVars ));
6057 }
6158}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments