-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create API to add custom Index/TimeTable Types #708
Comments
Hey @okmiim It allows extension developers to register custom time table generators. All "custom generators" are disabled by default and could be enabled in the extension manager configuration of EXT.calendarize. So it is possible to ship a few generators, but also external generators are also possible. Do you like this idea/API? I would add a few more generators/ideas shortly. Regards, |
Hi @lochmueller, your implementation is not compatible with TYPO3v12 anymore. Alternative idea: What I tried to implement: ( $flexForms = [];
/** @var SecondaryTimeTableService $secondaryTimeTableService */
$secondaryTimeTableService = GeneralUtility::makeInstance(SecondaryTimeTableService::class);
$services = $secondaryTimeTableService->getSecondaryTimeTables();
if (!empty($services)) {
ExtensionManagementUtility::addTcaSelectItemGroup(
'tx_calendarize_domain_model_configuration',
'type',
'secondary',
'Secondary'
);
foreach ($services as $service) {
$timeTable = [
'label' => $service->getLabel(),
'value' => $service->getIdentifier(),
'group' => 'secondary',
];
$flexForms[$service->getIdentifier()] = $service->getFlexForm();
ExtensionManagementUtility::addTcaSelectItem(
'tx_calendarize_domain_model_configuration',
'type',
$timeTable
);
$GLOBALS['TCA']['tx_calendarize_domain_model_configuration']['ctrl']['typeicon_classes'][$service->getIdentifier()] = 'apps-calendarize-type-' . Configuration::TYPE_TIME;
$GLOBALS['TCA']['tx_calendarize_domain_model_configuration']['types'][$service->getIdentifier()]['showitem'] = $service->getTcaServiceTypeFields();
}
}
ExtensionManagementUtility::addTCAcolumns('tx_calendarize_domain_model_configuration',
[
'flex_form' => [
'config' => [
'type' => 'flex',
'ds_pointerField' => 'type',
'ds' => $flexForms,
],
],
]
); |
Hey @okmiim , |
tbd.
The text was updated successfully, but these errors were encountered: