Feature #20102
closed
Add Core API function to Extension Management: getEMConfArray($key)
Added by Daniel Krupke over 15 years ago.
Updated about 6 years ago.
Description
There should be an easy and short way to get the EM_CONF Array for a specific extension key.
This one shoud be placed into t3lib/class.t3lib_extmgm.php (Core API).
Examples for defining such a function:
t3lib_extmgm::getEMConfArray($extkey) // you get full EM_CONF Array for extension: $extkey
t3lib_extmgm::getEMConfArray($extkey, $key) // you get value for $key in EM_CONF Array for extension: $extkey
(a problem with this one: keys can be nested in EM_CONF)
Examples of usage:
1)
$version = t3lib_extmgm::getEMConfArray('realurl', 'version');
2)
$realurl_emconf = t3lib_extmgm::getEMConfArray('realurl');
$version = $realurl_emconf['version'];
(issue imported from #M10563)
Files
Nested arrays could be expressed in TS style like this:
$dependencies = t3lib_extmgm::getEMConfArray($extkey,'constraints|depends');
Nice one.
What to return for a non-existing extension or configuration key? null?
+1 for Sebastian's proposal for nested array keys.
+1 for Marcus proposal of returning null at non-existing extensions or non-existing configuration array keys.
This API function can be used in implementation of Feature 0010398.
- Category changed from Extension Manager to Backend API
- Priority changed from Should have to Could have
- Target version deleted (
0)
- Status changed from New to Needs Feedback
- Assignee set to Thomas Maroschik
- Is Regression set to No
Can the package-manager do this?
- Status changed from Needs Feedback to Closed
The current implementation is a mess that can't be handled.
This issue will be tackled by using composer which offers a clean way of resolving conflicts
- Status changed from Closed to Needs Feedback
- Status changed from Needs Feedback to New
No Feedback question resetting to new.
- Tracker changed from Bug to Feature
- Status changed from New to Resolved
- Assignee deleted (
Thomas Maroschik)
I close this because it is possible to get the metadata of any extension with the PackageManager:
use TYPO3\CMS\Core\Package\PackageManager;
...
/** @var PackageManager $packagemanager */
$packageManager = $this->objectManager->get(PackageManager::class);
$package = $packageManager->getPackage('myExt');
$package->getPackageMetaData();
If this is not what you had in mind please answer to my comment or open a new ticket with additional discription of what you are missing in the current solution.
- Status changed from Resolved to Closed
Also available in: Atom
PDF