Feature #20102
closedAdd Core API function to Extension Management: getEMConfArray($key)
0%
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
Updated by Sebastian Gebhard over 15 years ago
Nested arrays could be expressed in TS style like this:
$dependencies = t3lib_extmgm::getEMConfArray($extkey,'constraints|depends');
Updated by Marcus Krause over 15 years ago
Nice one.
What to return for a non-existing extension or configuration key? null?
Updated by Daniel Krupke over 15 years ago
+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.
Updated by Helmut Hummel about 13 years ago
- Category changed from Extension Manager to Backend API
- Priority changed from Should have to Could have
- Target version deleted (
0)
Updated by Mathias Schreiber almost 10 years ago
- Status changed from New to Needs Feedback
- Assignee set to Thomas Maroschik
- Is Regression set to No
Can the package-manager do this?
Updated by Mathias Schreiber almost 10 years ago
- 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
Updated by Mathias Schreiber almost 10 years ago
- Status changed from Closed to Needs Feedback
argh, wrong tab.. sorry
Updated by Alexander Opitz over 9 years ago
- Status changed from Needs Feedback to New
No Feedback question resetting to new.
Updated by Daniel Goerz over 8 years ago
- 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.