Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2009-02-27
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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

10563_v1.diff (3.75 KB) 10563_v1.diff Administrator Admin, 2009-03-02 12:27
Actions #1

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');

Actions #2

Updated by Marcus Krause over 15 years ago

Nice one.

What to return for a non-existing extension or configuration key? null?

Actions #3

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.

Actions #4

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)
Actions #5

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?

Actions #6

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

Actions #7

Updated by Mathias Schreiber almost 10 years ago

  • Status changed from Closed to Needs Feedback

argh, wrong tab.. sorry

Actions #8

Updated by Alexander Opitz over 9 years ago

  • Status changed from Needs Feedback to New

No Feedback question resetting to new.

Actions #9

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.

Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF