Registry::getVendorExtensionName()
\nn\t3::Registry()->getVendorExtensionName($combinedVendorPluginName = '');
Generate plugin name. Depending on the Typo3 version, the plugin name is returned with or without the vendor.
\nn\t3::Registry()->getVendorExtensionName( 'nncalendar' ); // => Nng.Nncalendar
\nn\t3::Registry()->getVendorExtensionName( 'Nng\Nncalendar' ); // => Nng.Nncalendar
Copied!
| @return string
Source Code
public function getVendorExtensionName( $combinedVendorPluginName = '' )
{
// Nng als Vendor-Name verwenden, falls nichts angegeben.
$combinedVendorPluginName = str_replace('\\', '.', $combinedVendorPluginName);
if (strpos($combinedVendorPluginName, '.') === false) {
$combinedVendorPluginName = 'Nng.'.$combinedVendorPluginName;
}
$parts = explode('.', $combinedVendorPluginName);
$vendorName = GeneralUtility::underscoredToUpperCamelCase( $parts[0] );
$pluginName = GeneralUtility::underscoredToUpperCamelCase( $parts[1] );
$registrationName = "{$pluginName}";
return $registrationName;
}
Copied!