ext_localconf.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. defined('TYPO3_MODE') || die('Access denied.');
  3. call_user_func(
  4. function()
  5. {
  6. \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
  7. 'Opentalent.OtWidgets',
  8. 'Events',
  9. [
  10. 'Event' => 'preview'
  11. ],
  12. // non-cacheable actions
  13. [
  14. 'Event' => '',
  15. ]
  16. );
  17. \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
  18. 'Opentalent.OtWidgets',
  19. 'AllEvents',
  20. [
  21. 'Event' => 'index,show,noEvents'
  22. ],
  23. // non-cacheable actions
  24. [
  25. 'Event' => '',
  26. ]
  27. );
  28. \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
  29. 'Opentalent.OtWidgets',
  30. 'Donors',
  31. [
  32. 'Donor' => 'getDonors'
  33. ],
  34. // non-cacheable actions
  35. [
  36. ]
  37. );
  38. // wizards
  39. \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
  40. 'mod {
  41. wizards.newContentElement.wizardItems.plugins {
  42. elements {
  43. events {
  44. iconIdentifier = ot_widgets-plugin-events
  45. title = LLL:EXT:ot_widgets/Resources/Private/Language/locallang_db.xlf:tx_ot_widgets_events.name
  46. description = LLL:EXT:ot_widgets/Resources/Private/Language/locallang_db.xlf:tx_ot_widgets_events.description
  47. tt_content_defValues {
  48. CType = list
  49. list_type = otwidgets_events
  50. }
  51. }
  52. donors {
  53. iconIdentifier = ot_widgets-plugin-donors
  54. title = LLL:EXT:ot_widgets/Resources/Private/Language/locallang_db.xlf:tx_ot_widgets_donors.name
  55. description = LLL:EXT:ot_widgets/Resources/Private/Language/locallang_db.xlf:tx_ot_widgets_donors.description
  56. tt_content_defValues {
  57. CType = list
  58. list_type = otwidgets_donors
  59. }
  60. }
  61. }
  62. show = *
  63. }
  64. }'
  65. );
  66. $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
  67. $iconRegistry->registerIcon(
  68. 'ot_widgets-plugin-events',
  69. \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
  70. ['source' => 'EXT:ot_widgets/Resources/Public/Icons/user_plugin_events.svg']
  71. );
  72. $iconRegistry->registerIcon(
  73. 'ot_widgets-plugin-donors',
  74. \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
  75. ['source' => 'EXT:ot_widgets/Resources/Public/Icons/user_plugin_donors.svg']
  76. );
  77. }
  78. );