forked from drc-systems/product_advertisement
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_tables.php
More file actions
executable file
·49 lines (40 loc) · 2.18 KB
/
ext_tables.php
File metadata and controls
executable file
·49 lines (40 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Drcsystems.' . $_EXTKEY,
'Products',
'Products'
);
if (TYPO3_MODE === 'BE') {
/**
* Registers a Backend Module
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Drcsystems.' . $_EXTKEY,
'web', // Make module a submodule of 'web'
'modproducts', // Submodule key
'', // Position
array(
'Products' => 'searchBack, editMod, updateMod, delete, approve, disapprove, newCategory, createCategory, editCategory, updateCategory, deleteCategory, searchFirst',
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.gif',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_modproducts.xlf',
)
);
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Products Advertisement');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_productadvertisement_domain_model_category', 'EXT:product_advertisement/Resources/Private/Language/locallang_csh_tx_productadvertisement_domain_model_category.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_productadvertisement_domain_model_category');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_productadvertisement_domain_model_products', 'EXT:product_advertisement/Resources/Private/Language/locallang_csh_tx_productadvertisement_domain_model_products.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_productadvertisement_domain_model_products');
$extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY);
// Front-end Plugin Name
$frontendpluginName = 'Products';
// Register a flexform
$pluginSignature = strtolower($extensionName) . '_' . strtolower($frontendpluginName);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/pluginConfiguration.xml');