@@ -5,12 +5,12 @@ discard block |
||
| 5 | 5 | use TYPO3\CMS\Core\Utility\ArrayUtility; |
| 6 | 6 | |
| 7 | 7 | if (!defined('TYPO3')) { |
| 8 | - die('Access denied.'); |
|
| 8 | + die('Access denied.'); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | $tca = [ |
| 12 | - 'grid' => [ |
|
| 13 | - 'excluded_fields' => 'image, imagewidth, imageorient, imagecols, imageborder, image_noRows, image_effects, image_compression, tx_impexp_origuid, image_zoom, |
|
| 12 | + 'grid' => [ |
|
| 13 | + 'excluded_fields' => 'image, imagewidth, imageorient, imagecols, imageborder, image_noRows, image_effects, image_compression, tx_impexp_origuid, image_zoom, |
|
| 14 | 14 | spaceAfter, spaceBefore, |
| 15 | 15 | uploads_description, uploads_type, |
| 16 | 16 | media, assets, table_caption, table_delimiter, table_enclosure, table_header_position, table_tfoot, table_bgColor, table_border, table_cellpadding, table_cellspacing, |
@@ -20,39 +20,39 @@ discard block |
||
| 20 | 20 | target, linkToTop, menu_type, list_type, select_key, |
| 21 | 21 | file_collections, filelink_size, filelink_sorting, |
| 22 | 22 | external_media_ratio, external_media_source', |
| 23 | - 'columns' => [ |
|
| 24 | - '__checkbox' => [ |
|
| 25 | - 'renderer' => CheckBoxRenderer::class, |
|
| 26 | - ], |
|
| 27 | - 'uid' => [ |
|
| 28 | - 'visible' => false, |
|
| 29 | - 'label' => 'Id', |
|
| 30 | - 'width' => '5px', |
|
| 31 | - ], |
|
| 32 | - 'header' => [ |
|
| 33 | - 'editable' => true, |
|
| 34 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tt_content.xlf:header', |
|
| 35 | - ], |
|
| 36 | - 'tstamp' => [ |
|
| 37 | - 'visible' => false, |
|
| 38 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 39 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
| 40 | - ], |
|
| 41 | - 'crdate' => [ |
|
| 42 | - 'visible' => false, |
|
| 43 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 44 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
| 45 | - ], |
|
| 46 | - 'hidden' => [ |
|
| 47 | - 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
| 48 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
| 49 | - 'width' => '3%', |
|
| 50 | - ], |
|
| 51 | - '__buttons' => [ |
|
| 52 | - 'renderer' => ButtonGroupRenderer::class, |
|
| 53 | - ], |
|
| 54 | - ], |
|
| 55 | - ], |
|
| 23 | + 'columns' => [ |
|
| 24 | + '__checkbox' => [ |
|
| 25 | + 'renderer' => CheckBoxRenderer::class, |
|
| 26 | + ], |
|
| 27 | + 'uid' => [ |
|
| 28 | + 'visible' => false, |
|
| 29 | + 'label' => 'Id', |
|
| 30 | + 'width' => '5px', |
|
| 31 | + ], |
|
| 32 | + 'header' => [ |
|
| 33 | + 'editable' => true, |
|
| 34 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tt_content.xlf:header', |
|
| 35 | + ], |
|
| 36 | + 'tstamp' => [ |
|
| 37 | + 'visible' => false, |
|
| 38 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 39 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
| 40 | + ], |
|
| 41 | + 'crdate' => [ |
|
| 42 | + 'visible' => false, |
|
| 43 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 44 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
| 45 | + ], |
|
| 46 | + 'hidden' => [ |
|
| 47 | + 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
| 48 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
| 49 | + 'width' => '3%', |
|
| 50 | + ], |
|
| 51 | + '__buttons' => [ |
|
| 52 | + 'renderer' => ButtonGroupRenderer::class, |
|
| 53 | + ], |
|
| 54 | + ], |
|
| 55 | + ], |
|
| 56 | 56 | ]; |
| 57 | 57 | |
| 58 | 58 | ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['tt_content'], $tca); |
@@ -7,113 +7,113 @@ |
||
| 7 | 7 | use TYPO3\CMS\Core\Utility\ArrayUtility; |
| 8 | 8 | |
| 9 | 9 | if (!defined('TYPO3')) { |
| 10 | - die('Access denied.'); |
|
| 10 | + die('Access denied.'); |
|
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | $tca = [ |
| 14 | - 'ctrl' => [ |
|
| 15 | - // By default "searchFields" has many fields which has a performance cost when dealing with large data-set. |
|
| 16 | - // Override search field for performance reason. |
|
| 17 | - // To restore default values, just replace with this: $GLOBALS['TCA']['fe_users']['ctrl']['searchFields'] . ',usergroup', |
|
| 18 | - 'searchFields' => 'username, first_name, last_name, usergroup', |
|
| 19 | - ], |
|
| 20 | - 'vidi' => [ |
|
| 21 | - // Special case when the field name does not follow the conventions. |
|
| 22 | - // Vidi needs a bit of help to find the equivalence fieldName <-> propertyName. |
|
| 23 | - 'mappings' => [ |
|
| 24 | - 'lockToDomain' => 'lockToDomain', |
|
| 25 | - 'TSconfig' => 'tsConfig', |
|
| 26 | - 'felogin_redirectPid' => 'feLoginRedirectPid', |
|
| 27 | - 'felogin_forgotHash' => 'feLoginForgotHash', |
|
| 28 | - ], |
|
| 29 | - ], |
|
| 30 | - 'grid' => [ |
|
| 31 | - 'excluded_fields' => 'lockToDomain, TSconfig, felogin_redirectPid, felogin_forgotHash, auth_token, image', |
|
| 32 | - 'export' => [ |
|
| 33 | - 'include_files' => false, |
|
| 34 | - ], |
|
| 35 | - 'facets' => [ |
|
| 36 | - 'uid', |
|
| 37 | - 'username', |
|
| 38 | - 'name', |
|
| 39 | - 'first_name', |
|
| 40 | - 'last_name', |
|
| 41 | - 'address', |
|
| 42 | - 'telephone', |
|
| 43 | - 'fax', |
|
| 44 | - 'email', |
|
| 45 | - 'title', |
|
| 46 | - 'zip', |
|
| 47 | - 'city', |
|
| 48 | - 'country', |
|
| 49 | - 'company', |
|
| 50 | - 'usergroup', |
|
| 51 | - StandardFacet::class => [ |
|
| 52 | - 'name' => 'disable', |
|
| 53 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
| 54 | - 'suggestions' => [ |
|
| 55 | - '0' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.0', |
|
| 56 | - '1' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.1' |
|
| 57 | - ] |
|
| 58 | - ], |
|
| 59 | - PageFacet::class => [ |
|
| 60 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid' |
|
| 61 | - ], |
|
| 62 | - ], |
|
| 63 | - 'columns' => [ |
|
| 64 | - '__checkbox' => [ |
|
| 65 | - 'renderer' => CheckBoxRenderer::class, |
|
| 66 | - ], |
|
| 67 | - 'uid' => [ |
|
| 68 | - 'visible' => false, |
|
| 69 | - 'label' => 'Id', |
|
| 70 | - 'width' => '5px', |
|
| 71 | - ], |
|
| 72 | - 'username' => [ |
|
| 73 | - 'visible' => true, |
|
| 74 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:username', |
|
| 75 | - 'editable' => true, |
|
| 76 | - ], |
|
| 77 | - 'name' => [ |
|
| 78 | - 'visible' => true, |
|
| 79 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:name', |
|
| 80 | - 'editable' => true, |
|
| 81 | - ], |
|
| 82 | - 'email' => [ |
|
| 83 | - 'visible' => true, |
|
| 84 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:email', |
|
| 85 | - 'editable' => true, |
|
| 86 | - ], |
|
| 87 | - 'usergroup' => [ |
|
| 88 | - 'visible' => true, |
|
| 89 | - 'renderers' => [ |
|
| 90 | - 'Fab\Vidi\Grid\RelationEditRenderer', |
|
| 91 | - 'Fab\Vidi\Grid\RelationRenderer', |
|
| 92 | - ], |
|
| 93 | - 'editable' => true, |
|
| 94 | - 'sortable' => false, |
|
| 95 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:usergroup', |
|
| 96 | - ], |
|
| 97 | - 'tstamp' => [ |
|
| 98 | - 'visible' => false, |
|
| 99 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 100 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
| 101 | - ], |
|
| 102 | - 'crdate' => [ |
|
| 103 | - 'visible' => false, |
|
| 104 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 105 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
| 106 | - ], |
|
| 107 | - 'disable' => [ |
|
| 108 | - 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
| 109 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
| 110 | - 'width' => '3%', |
|
| 111 | - ], |
|
| 112 | - '__buttons' => [ |
|
| 113 | - 'renderer' => ButtonGroupRenderer::class, |
|
| 114 | - ], |
|
| 115 | - ], |
|
| 116 | - ], |
|
| 14 | + 'ctrl' => [ |
|
| 15 | + // By default "searchFields" has many fields which has a performance cost when dealing with large data-set. |
|
| 16 | + // Override search field for performance reason. |
|
| 17 | + // To restore default values, just replace with this: $GLOBALS['TCA']['fe_users']['ctrl']['searchFields'] . ',usergroup', |
|
| 18 | + 'searchFields' => 'username, first_name, last_name, usergroup', |
|
| 19 | + ], |
|
| 20 | + 'vidi' => [ |
|
| 21 | + // Special case when the field name does not follow the conventions. |
|
| 22 | + // Vidi needs a bit of help to find the equivalence fieldName <-> propertyName. |
|
| 23 | + 'mappings' => [ |
|
| 24 | + 'lockToDomain' => 'lockToDomain', |
|
| 25 | + 'TSconfig' => 'tsConfig', |
|
| 26 | + 'felogin_redirectPid' => 'feLoginRedirectPid', |
|
| 27 | + 'felogin_forgotHash' => 'feLoginForgotHash', |
|
| 28 | + ], |
|
| 29 | + ], |
|
| 30 | + 'grid' => [ |
|
| 31 | + 'excluded_fields' => 'lockToDomain, TSconfig, felogin_redirectPid, felogin_forgotHash, auth_token, image', |
|
| 32 | + 'export' => [ |
|
| 33 | + 'include_files' => false, |
|
| 34 | + ], |
|
| 35 | + 'facets' => [ |
|
| 36 | + 'uid', |
|
| 37 | + 'username', |
|
| 38 | + 'name', |
|
| 39 | + 'first_name', |
|
| 40 | + 'last_name', |
|
| 41 | + 'address', |
|
| 42 | + 'telephone', |
|
| 43 | + 'fax', |
|
| 44 | + 'email', |
|
| 45 | + 'title', |
|
| 46 | + 'zip', |
|
| 47 | + 'city', |
|
| 48 | + 'country', |
|
| 49 | + 'company', |
|
| 50 | + 'usergroup', |
|
| 51 | + StandardFacet::class => [ |
|
| 52 | + 'name' => 'disable', |
|
| 53 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
| 54 | + 'suggestions' => [ |
|
| 55 | + '0' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.0', |
|
| 56 | + '1' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.1' |
|
| 57 | + ] |
|
| 58 | + ], |
|
| 59 | + PageFacet::class => [ |
|
| 60 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid' |
|
| 61 | + ], |
|
| 62 | + ], |
|
| 63 | + 'columns' => [ |
|
| 64 | + '__checkbox' => [ |
|
| 65 | + 'renderer' => CheckBoxRenderer::class, |
|
| 66 | + ], |
|
| 67 | + 'uid' => [ |
|
| 68 | + 'visible' => false, |
|
| 69 | + 'label' => 'Id', |
|
| 70 | + 'width' => '5px', |
|
| 71 | + ], |
|
| 72 | + 'username' => [ |
|
| 73 | + 'visible' => true, |
|
| 74 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:username', |
|
| 75 | + 'editable' => true, |
|
| 76 | + ], |
|
| 77 | + 'name' => [ |
|
| 78 | + 'visible' => true, |
|
| 79 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:name', |
|
| 80 | + 'editable' => true, |
|
| 81 | + ], |
|
| 82 | + 'email' => [ |
|
| 83 | + 'visible' => true, |
|
| 84 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:email', |
|
| 85 | + 'editable' => true, |
|
| 86 | + ], |
|
| 87 | + 'usergroup' => [ |
|
| 88 | + 'visible' => true, |
|
| 89 | + 'renderers' => [ |
|
| 90 | + 'Fab\Vidi\Grid\RelationEditRenderer', |
|
| 91 | + 'Fab\Vidi\Grid\RelationRenderer', |
|
| 92 | + ], |
|
| 93 | + 'editable' => true, |
|
| 94 | + 'sortable' => false, |
|
| 95 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:usergroup', |
|
| 96 | + ], |
|
| 97 | + 'tstamp' => [ |
|
| 98 | + 'visible' => false, |
|
| 99 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 100 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
| 101 | + ], |
|
| 102 | + 'crdate' => [ |
|
| 103 | + 'visible' => false, |
|
| 104 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 105 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
| 106 | + ], |
|
| 107 | + 'disable' => [ |
|
| 108 | + 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
| 109 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
| 110 | + 'width' => '3%', |
|
| 111 | + ], |
|
| 112 | + '__buttons' => [ |
|
| 113 | + 'renderer' => ButtonGroupRenderer::class, |
|
| 114 | + ], |
|
| 115 | + ], |
|
| 116 | + ], |
|
| 117 | 117 | ]; |
| 118 | 118 | |
| 119 | 119 | ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['fe_users'], $tca); |
@@ -6,62 +6,62 @@ |
||
| 6 | 6 | use TYPO3\CMS\Core\Utility\ArrayUtility; |
| 7 | 7 | |
| 8 | 8 | if (!defined('TYPO3')) { |
| 9 | - die('Access denied.'); |
|
| 9 | + die('Access denied.'); |
|
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | $tca = [ |
| 13 | - 'vidi' => [ |
|
| 14 | - // Special case when the field name does not follow the conventions. |
|
| 15 | - // Vidi needs a bit of help to find the equivalence fieldName <-> propertyName. |
|
| 16 | - 'mappings' => [ |
|
| 17 | - 'lockToDomain' => 'lockToDomain', |
|
| 18 | - 'TSconfig' => 'tsConfig', |
|
| 19 | - 'felogin_redirectPid' => 'feLoginRedirectPid', |
|
| 20 | - ], |
|
| 21 | - ], |
|
| 22 | - 'grid' => [ |
|
| 23 | - 'facets' => [ |
|
| 24 | - 'uid', |
|
| 25 | - 'title', |
|
| 26 | - 'description', |
|
| 27 | - PageFacet::class => [ |
|
| 28 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid' |
|
| 29 | - ] |
|
| 30 | - ], |
|
| 31 | - 'columns' => [ |
|
| 32 | - '__checkbox' => [ |
|
| 33 | - 'renderer' => CheckBoxRenderer::class, |
|
| 34 | - ], |
|
| 35 | - 'uid' => [ |
|
| 36 | - 'visible' => false, |
|
| 37 | - 'label' => 'Id', |
|
| 38 | - 'width' => '5px', |
|
| 39 | - ], |
|
| 40 | - 'title' => [ |
|
| 41 | - 'visible' => true, |
|
| 42 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_groups.xlf:title', |
|
| 43 | - 'editable' => true, |
|
| 44 | - ], |
|
| 45 | - 'tstamp' => [ |
|
| 46 | - 'visible' => false, |
|
| 47 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 48 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
| 49 | - ], |
|
| 50 | - 'crdate' => [ |
|
| 51 | - 'visible' => false, |
|
| 52 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 53 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
| 54 | - ], |
|
| 55 | - 'hidden' => [ |
|
| 56 | - 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
| 57 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:visibility_abbreviation', |
|
| 58 | - 'width' => '3%', |
|
| 59 | - ], |
|
| 60 | - '__buttons' => [ |
|
| 61 | - 'renderer' => ButtonGroupRenderer::class, |
|
| 62 | - ], |
|
| 63 | - ] |
|
| 64 | - ] |
|
| 13 | + 'vidi' => [ |
|
| 14 | + // Special case when the field name does not follow the conventions. |
|
| 15 | + // Vidi needs a bit of help to find the equivalence fieldName <-> propertyName. |
|
| 16 | + 'mappings' => [ |
|
| 17 | + 'lockToDomain' => 'lockToDomain', |
|
| 18 | + 'TSconfig' => 'tsConfig', |
|
| 19 | + 'felogin_redirectPid' => 'feLoginRedirectPid', |
|
| 20 | + ], |
|
| 21 | + ], |
|
| 22 | + 'grid' => [ |
|
| 23 | + 'facets' => [ |
|
| 24 | + 'uid', |
|
| 25 | + 'title', |
|
| 26 | + 'description', |
|
| 27 | + PageFacet::class => [ |
|
| 28 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid' |
|
| 29 | + ] |
|
| 30 | + ], |
|
| 31 | + 'columns' => [ |
|
| 32 | + '__checkbox' => [ |
|
| 33 | + 'renderer' => CheckBoxRenderer::class, |
|
| 34 | + ], |
|
| 35 | + 'uid' => [ |
|
| 36 | + 'visible' => false, |
|
| 37 | + 'label' => 'Id', |
|
| 38 | + 'width' => '5px', |
|
| 39 | + ], |
|
| 40 | + 'title' => [ |
|
| 41 | + 'visible' => true, |
|
| 42 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_groups.xlf:title', |
|
| 43 | + 'editable' => true, |
|
| 44 | + ], |
|
| 45 | + 'tstamp' => [ |
|
| 46 | + 'visible' => false, |
|
| 47 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 48 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
| 49 | + ], |
|
| 50 | + 'crdate' => [ |
|
| 51 | + 'visible' => false, |
|
| 52 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
| 53 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
| 54 | + ], |
|
| 55 | + 'hidden' => [ |
|
| 56 | + 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
| 57 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:visibility_abbreviation', |
|
| 58 | + 'width' => '3%', |
|
| 59 | + ], |
|
| 60 | + '__buttons' => [ |
|
| 61 | + 'renderer' => ButtonGroupRenderer::class, |
|
| 62 | + ], |
|
| 63 | + ] |
|
| 64 | + ] |
|
| 65 | 65 | ]; |
| 66 | 66 | |
| 67 | 67 | ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['fe_groups'], $tca); |
@@ -1,92 +1,92 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | if (!defined('TYPO3')) { |
| 4 | - die('Access denied.'); |
|
| 4 | + die('Access denied.'); |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | return [ |
| 8 | - 'ctrl' => [ |
|
| 9 | - 'title' => 'LLL:EXT:phpdisplay/Resources/Private/Language/locallang_db.xml:tx_phpdisplay_displays', |
|
| 10 | - 'label' => 'name', |
|
| 11 | - 'tstamp' => 'tstamp', |
|
| 12 | - 'crdate' => 'crdate', |
|
| 13 | - 'cruser_id' => 'cruser_id', |
|
| 14 | - 'hideTable' => true, |
|
| 15 | - 'delete' => 'deleted', |
|
| 16 | - 'enablecolumns' => [ |
|
| 17 | - 'disabled' => 'hidden', |
|
| 18 | - ], |
|
| 19 | - 'searchFields' => 'type,name,data_type', |
|
| 20 | - 'typeicon_classes' => [ |
|
| 21 | - 'default' => 'extensions-vidi-selection', |
|
| 22 | - ], |
|
| 23 | - ], |
|
| 24 | - 'types' => [ |
|
| 25 | - '1' => ['showitem' => 'hidden,--palette--;;1,type,name,data_type,query'], |
|
| 26 | - ], |
|
| 27 | - 'palettes' => [ |
|
| 28 | - '1' => ['showitem' => ''], |
|
| 29 | - ], |
|
| 30 | - 'columns' => [ |
|
| 8 | + 'ctrl' => [ |
|
| 9 | + 'title' => 'LLL:EXT:phpdisplay/Resources/Private/Language/locallang_db.xml:tx_phpdisplay_displays', |
|
| 10 | + 'label' => 'name', |
|
| 11 | + 'tstamp' => 'tstamp', |
|
| 12 | + 'crdate' => 'crdate', |
|
| 13 | + 'cruser_id' => 'cruser_id', |
|
| 14 | + 'hideTable' => true, |
|
| 15 | + 'delete' => 'deleted', |
|
| 16 | + 'enablecolumns' => [ |
|
| 17 | + 'disabled' => 'hidden', |
|
| 18 | + ], |
|
| 19 | + 'searchFields' => 'type,name,data_type', |
|
| 20 | + 'typeicon_classes' => [ |
|
| 21 | + 'default' => 'extensions-vidi-selection', |
|
| 22 | + ], |
|
| 23 | + ], |
|
| 24 | + 'types' => [ |
|
| 25 | + '1' => ['showitem' => 'hidden,--palette--;;1,type,name,data_type,query'], |
|
| 26 | + ], |
|
| 27 | + 'palettes' => [ |
|
| 28 | + '1' => ['showitem' => ''], |
|
| 29 | + ], |
|
| 30 | + 'columns' => [ |
|
| 31 | 31 | |
| 32 | - 'hidden' => [ |
|
| 33 | - 'exclude' => 1, |
|
| 34 | - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden', |
|
| 35 | - 'config' => [ |
|
| 36 | - 'type' => 'check', |
|
| 37 | - ], |
|
| 38 | - ], |
|
| 39 | - 'visibility' => [ |
|
| 40 | - 'exclude' => 0, |
|
| 41 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility', |
|
| 42 | - 'config' => [ |
|
| 43 | - 'type' => 'select', |
|
| 44 | - 'renderType' => 'selectSingle', |
|
| 45 | - 'items' => [ |
|
| 46 | - ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.everyone', 0], |
|
| 47 | - ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.private', 1], |
|
| 48 | - ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.admin_only', 2], |
|
| 49 | - ], |
|
| 50 | - 'size' => 1, |
|
| 51 | - 'maxitems' => 1, |
|
| 52 | - 'minitems' => 1, |
|
| 53 | - ], |
|
| 54 | - ], |
|
| 55 | - 'name' => [ |
|
| 56 | - 'exclude' => 0, |
|
| 57 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:name', |
|
| 58 | - 'config' => [ |
|
| 59 | - 'type' => 'input', |
|
| 60 | - 'size' => 30, |
|
| 61 | - 'eval' => 'trim,required' |
|
| 62 | - ], |
|
| 63 | - ], |
|
| 64 | - 'data_type' => [ |
|
| 65 | - 'exclude' => 0, |
|
| 66 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:data_type', |
|
| 67 | - 'config' => [ |
|
| 68 | - 'type' => 'input', |
|
| 69 | - 'size' => 30, |
|
| 70 | - 'eval' => 'trim,required' |
|
| 71 | - ], |
|
| 72 | - ], |
|
| 73 | - 'query' => [ |
|
| 74 | - 'exclude' => 0, |
|
| 75 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:query', |
|
| 76 | - 'config' => [ |
|
| 77 | - 'type' => 'text', |
|
| 78 | - 'rows' => 5, |
|
| 79 | - 'cols' => 5, |
|
| 80 | - ], |
|
| 81 | - ], |
|
| 82 | - 'speaking_query' => [ |
|
| 83 | - 'exclude' => 0, |
|
| 84 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:speaking_query', |
|
| 85 | - 'config' => [ |
|
| 86 | - 'type' => 'text', |
|
| 87 | - 'rows' => 5, |
|
| 88 | - 'cols' => 5, |
|
| 89 | - ], |
|
| 90 | - ], |
|
| 91 | - ], |
|
| 32 | + 'hidden' => [ |
|
| 33 | + 'exclude' => 1, |
|
| 34 | + 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden', |
|
| 35 | + 'config' => [ |
|
| 36 | + 'type' => 'check', |
|
| 37 | + ], |
|
| 38 | + ], |
|
| 39 | + 'visibility' => [ |
|
| 40 | + 'exclude' => 0, |
|
| 41 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility', |
|
| 42 | + 'config' => [ |
|
| 43 | + 'type' => 'select', |
|
| 44 | + 'renderType' => 'selectSingle', |
|
| 45 | + 'items' => [ |
|
| 46 | + ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.everyone', 0], |
|
| 47 | + ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.private', 1], |
|
| 48 | + ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.admin_only', 2], |
|
| 49 | + ], |
|
| 50 | + 'size' => 1, |
|
| 51 | + 'maxitems' => 1, |
|
| 52 | + 'minitems' => 1, |
|
| 53 | + ], |
|
| 54 | + ], |
|
| 55 | + 'name' => [ |
|
| 56 | + 'exclude' => 0, |
|
| 57 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:name', |
|
| 58 | + 'config' => [ |
|
| 59 | + 'type' => 'input', |
|
| 60 | + 'size' => 30, |
|
| 61 | + 'eval' => 'trim,required' |
|
| 62 | + ], |
|
| 63 | + ], |
|
| 64 | + 'data_type' => [ |
|
| 65 | + 'exclude' => 0, |
|
| 66 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:data_type', |
|
| 67 | + 'config' => [ |
|
| 68 | + 'type' => 'input', |
|
| 69 | + 'size' => 30, |
|
| 70 | + 'eval' => 'trim,required' |
|
| 71 | + ], |
|
| 72 | + ], |
|
| 73 | + 'query' => [ |
|
| 74 | + 'exclude' => 0, |
|
| 75 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:query', |
|
| 76 | + 'config' => [ |
|
| 77 | + 'type' => 'text', |
|
| 78 | + 'rows' => 5, |
|
| 79 | + 'cols' => 5, |
|
| 80 | + ], |
|
| 81 | + ], |
|
| 82 | + 'speaking_query' => [ |
|
| 83 | + 'exclude' => 0, |
|
| 84 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:speaking_query', |
|
| 85 | + 'config' => [ |
|
| 86 | + 'type' => 'text', |
|
| 87 | + 'rows' => 5, |
|
| 88 | + 'cols' => 5, |
|
| 89 | + ], |
|
| 90 | + ], |
|
| 91 | + ], |
|
| 92 | 92 | ]; |
@@ -18,166 +18,166 @@ |
||
| 18 | 18 | defined('TYPO3') or die(); |
| 19 | 19 | |
| 20 | 20 | call_user_func(function () { |
| 21 | - // Check from Vidi configuration what default module should be loaded. |
|
| 22 | - // Make sure the class exists to avoid a Runtime Error |
|
| 23 | - |
|
| 24 | - // Add content main module before 'user' |
|
| 25 | - if (!isset($GLOBALS['TBE_MODULES']['content'])) { |
|
| 26 | - // Position module "content" after module "user" manually. No API is available for that, it seems... |
|
| 27 | - $modules = []; |
|
| 28 | - foreach ($GLOBALS['TBE_MODULES'] as $key => $val) { |
|
| 29 | - if ($key === 'user') { |
|
| 30 | - $modules['content'] = ''; |
|
| 31 | - } |
|
| 32 | - $modules[$key] = $val; |
|
| 33 | - } |
|
| 34 | - $GLOBALS['TBE_MODULES'] = $modules; |
|
| 35 | - |
|
| 36 | - // Register "data management" module. |
|
| 37 | - ExtensionManagementUtility::addModule( |
|
| 38 | - 'content', |
|
| 39 | - '', |
|
| 40 | - '', |
|
| 41 | - '', |
|
| 42 | - [ |
|
| 43 | - 'name' => 'content', |
|
| 44 | - 'access' => 'user,group', |
|
| 45 | - 'labels' => [ |
|
| 46 | - 'll_ref' => 'LLL:EXT:vidi/Resources/Private/Language/content_module.xlf', |
|
| 47 | - ], |
|
| 48 | - ] |
|
| 49 | - ); |
|
| 50 | - } |
|
| 51 | - |
|
| 52 | - $configuration = GeneralUtility::makeInstance( |
|
| 53 | - ExtensionConfiguration::class |
|
| 54 | - )->get('vidi'); |
|
| 55 | - |
|
| 56 | - $pids = GeneralUtility::trimExplode(',', $configuration['default_pid'], true); |
|
| 57 | - $defaultPid = array_shift($pids); |
|
| 58 | - $defaultPids = []; |
|
| 59 | - foreach ($pids as $dataTypeAndPid) { |
|
| 60 | - $parts = GeneralUtility::trimExplode(':', $dataTypeAndPid); |
|
| 61 | - if (count($parts) === 2) { |
|
| 62 | - $defaultPids[$parts[0]] = $parts[1]; |
|
| 63 | - } |
|
| 64 | - } |
|
| 65 | - |
|
| 66 | - // Loop around the data types and register them to be displayed within a BE module. |
|
| 67 | - if ($configuration['data_types']) { |
|
| 68 | - $dataTypes = GeneralUtility::trimExplode(',', $configuration['data_types'], true); |
|
| 69 | - foreach ($dataTypes as $dataType) { |
|
| 70 | - /** @var ModuleLoader $moduleLoader */ |
|
| 71 | - $moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class, $dataType); |
|
| 72 | - |
|
| 73 | - // Special case already defined in Vidi. |
|
| 74 | - if ($dataType === 'fe_users') { |
|
| 75 | - $languageFile = 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf'; |
|
| 76 | - $icon = 'EXT:vidi/Resources/Public/Images/fe_users.svg'; |
|
| 77 | - } elseif ($dataType === 'fe_groups') { |
|
| 78 | - $languageFile = 'LLL:EXT:vidi/Resources/Private/Language/fe_groups.xlf'; |
|
| 79 | - $icon = 'EXT:vidi/Resources/Public/Images/fe_groups.svg'; |
|
| 80 | - } else { |
|
| 81 | - /** @var LanguageFileGenerator $languageService */ |
|
| 82 | - $languageService = GeneralUtility::makeInstance(LanguageFileGenerator::class); |
|
| 83 | - $languageFile = $languageService->generate($dataType); |
|
| 84 | - $icon = ''; |
|
| 85 | - } |
|
| 86 | - |
|
| 87 | - $pid = $defaultPids[$dataType] ?? $defaultPid; |
|
| 88 | - |
|
| 89 | - /** @var ModuleLoader $moduleLoader */ |
|
| 90 | - $moduleLoader->setIcon($icon) |
|
| 91 | - ->setModuleLanguageFile($languageFile) |
|
| 92 | - ->setDefaultPid($pid) |
|
| 93 | - ->register(); |
|
| 94 | - } |
|
| 95 | - } |
|
| 96 | - |
|
| 97 | - // Possible Static TS loading |
|
| 98 | - if (true === isset($configuration['autoload_typoscript']) && false === (bool)$configuration['autoload_typoscript']) { |
|
| 99 | - ExtensionManagementUtility::addStaticFile('vidi', 'Configuration/TypoScript', 'Vidi: versatile and interactive display'); |
|
| 100 | - } |
|
| 101 | - |
|
| 102 | - // Register List2 only if beta feature is enabled. |
|
| 103 | - // @todo let see what we do with that |
|
| 104 | - #if ($configuration['activate_beta_features']) { |
|
| 105 | - # $labelFile = 'LLL:EXT:vidi/Resources/Private/Language/locallang_module.xlf'; |
|
| 106 | - # |
|
| 107 | - # if (!$configuration['hide_module_list']) { |
|
| 108 | - # $labelFile = 'LLL:EXT:vidi/Resources/Private/Language/locallang_module_transitional.xlf'; |
|
| 109 | - # } |
|
| 110 | - # |
|
| 111 | - # \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( |
|
| 112 | - # 'vidi', |
|
| 113 | - # 'web', // Make module a submodule of 'web' |
|
| 114 | - # 'm1', // Submodule key |
|
| 115 | - # 'after:list', // Position |
|
| 116 | - # array( |
|
| 117 | - # 'Content' => 'index, list, delete, update, edit, copy, move, localize, sort, copyClipboard, moveClipboard', |
|
| 118 | - # 'Tool' => 'welcome, work', |
|
| 119 | - # 'Facet' => 'autoSuggest, autoSuggests', |
|
| 120 | - # 'Selection' => 'edit, update, create, delete, list, show', |
|
| 121 | - # 'UserPreferences' => 'save', |
|
| 122 | - # 'Clipboard' => 'save, flush, show', |
|
| 123 | - # ), array( |
|
| 124 | - # 'access' => 'user,group', |
|
| 125 | - # 'icon' => 'EXT:vidi/Resources/Public/Images/list.png', |
|
| 126 | - # 'labels' => $labelFile, |
|
| 127 | - # ) |
|
| 128 | - # ); |
|
| 129 | - #} |
|
| 130 | - #if ($configuration['hide_module_list']) { |
|
| 131 | - # |
|
| 132 | - # // Default User TSConfig to be added in any case. |
|
| 133 | - # TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(' |
|
| 134 | - # |
|
| 135 | - # # Hide the module in the BE. |
|
| 136 | - # options.hideModules.web := addToList(list) |
|
| 137 | - # '); |
|
| 138 | - #} |
|
| 139 | - |
|
| 140 | - /** @var $signalSlotDispatcher \TYPO3\CMS\Extbase\SignalSlot\Dispatcher */ |
|
| 141 | - $signalSlotDispatcher = GeneralUtility::makeInstance(Dispatcher::class); |
|
| 142 | - |
|
| 143 | - // Connect "processContentData" signal slot with the "ContentObjectProcessor". |
|
| 144 | - $signalSlotDispatcher->connect( |
|
| 145 | - 'Fab\Vidi\Controller\Backend\ContentController', |
|
| 146 | - 'processContentData', |
|
| 147 | - ContentObjectProcessor::class, |
|
| 148 | - 'processRelations', |
|
| 149 | - true |
|
| 150 | - ); |
|
| 151 | - |
|
| 152 | - // Connect "processContentData" signal with the "MarkerProcessor". |
|
| 153 | - $signalSlotDispatcher->connect( |
|
| 154 | - 'Fab\Vidi\Controller\Backend\ContentController', |
|
| 155 | - 'processContentData', |
|
| 156 | - MarkerProcessor::class, |
|
| 157 | - 'processMarkers', |
|
| 158 | - true |
|
| 159 | - ); |
|
| 160 | - |
|
| 161 | - // Register default Tools for Vidi. |
|
| 162 | - ToolRegistry::getInstance()->register('*', ModulePreferencesTool::class); |
|
| 163 | - ToolRegistry::getInstance()->register('*', RelationAnalyserTool::class); |
|
| 164 | - ToolRegistry::getInstance()->register('*', ConfiguredPidTool::class); |
|
| 165 | - |
|
| 166 | - // Add new sprite icon. |
|
| 167 | - $icons = [ |
|
| 168 | - 'go' => 'EXT:vidi/Resources/Public/Images/bullet_go.png', |
|
| 169 | - 'query' => 'EXT:vidi/Resources/Public/Images/drive_disk.png', |
|
| 170 | - ]; |
|
| 171 | - /** @var IconRegistry $iconRegistry */ |
|
| 172 | - $iconRegistry = GeneralUtility::makeInstance(IconRegistry::class); |
|
| 173 | - foreach ($icons as $key => $icon) { |
|
| 174 | - $iconRegistry->registerIcon( |
|
| 175 | - 'extensions-vidi-' . $key, |
|
| 176 | - BitmapIconProvider::class, |
|
| 177 | - [ |
|
| 178 | - 'source' => $icon |
|
| 179 | - ] |
|
| 180 | - ); |
|
| 181 | - } |
|
| 182 | - unset($iconRegistry); |
|
| 21 | + // Check from Vidi configuration what default module should be loaded. |
|
| 22 | + // Make sure the class exists to avoid a Runtime Error |
|
| 23 | + |
|
| 24 | + // Add content main module before 'user' |
|
| 25 | + if (!isset($GLOBALS['TBE_MODULES']['content'])) { |
|
| 26 | + // Position module "content" after module "user" manually. No API is available for that, it seems... |
|
| 27 | + $modules = []; |
|
| 28 | + foreach ($GLOBALS['TBE_MODULES'] as $key => $val) { |
|
| 29 | + if ($key === 'user') { |
|
| 30 | + $modules['content'] = ''; |
|
| 31 | + } |
|
| 32 | + $modules[$key] = $val; |
|
| 33 | + } |
|
| 34 | + $GLOBALS['TBE_MODULES'] = $modules; |
|
| 35 | + |
|
| 36 | + // Register "data management" module. |
|
| 37 | + ExtensionManagementUtility::addModule( |
|
| 38 | + 'content', |
|
| 39 | + '', |
|
| 40 | + '', |
|
| 41 | + '', |
|
| 42 | + [ |
|
| 43 | + 'name' => 'content', |
|
| 44 | + 'access' => 'user,group', |
|
| 45 | + 'labels' => [ |
|
| 46 | + 'll_ref' => 'LLL:EXT:vidi/Resources/Private/Language/content_module.xlf', |
|
| 47 | + ], |
|
| 48 | + ] |
|
| 49 | + ); |
|
| 50 | + } |
|
| 51 | + |
|
| 52 | + $configuration = GeneralUtility::makeInstance( |
|
| 53 | + ExtensionConfiguration::class |
|
| 54 | + )->get('vidi'); |
|
| 55 | + |
|
| 56 | + $pids = GeneralUtility::trimExplode(',', $configuration['default_pid'], true); |
|
| 57 | + $defaultPid = array_shift($pids); |
|
| 58 | + $defaultPids = []; |
|
| 59 | + foreach ($pids as $dataTypeAndPid) { |
|
| 60 | + $parts = GeneralUtility::trimExplode(':', $dataTypeAndPid); |
|
| 61 | + if (count($parts) === 2) { |
|
| 62 | + $defaultPids[$parts[0]] = $parts[1]; |
|
| 63 | + } |
|
| 64 | + } |
|
| 65 | + |
|
| 66 | + // Loop around the data types and register them to be displayed within a BE module. |
|
| 67 | + if ($configuration['data_types']) { |
|
| 68 | + $dataTypes = GeneralUtility::trimExplode(',', $configuration['data_types'], true); |
|
| 69 | + foreach ($dataTypes as $dataType) { |
|
| 70 | + /** @var ModuleLoader $moduleLoader */ |
|
| 71 | + $moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class, $dataType); |
|
| 72 | + |
|
| 73 | + // Special case already defined in Vidi. |
|
| 74 | + if ($dataType === 'fe_users') { |
|
| 75 | + $languageFile = 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf'; |
|
| 76 | + $icon = 'EXT:vidi/Resources/Public/Images/fe_users.svg'; |
|
| 77 | + } elseif ($dataType === 'fe_groups') { |
|
| 78 | + $languageFile = 'LLL:EXT:vidi/Resources/Private/Language/fe_groups.xlf'; |
|
| 79 | + $icon = 'EXT:vidi/Resources/Public/Images/fe_groups.svg'; |
|
| 80 | + } else { |
|
| 81 | + /** @var LanguageFileGenerator $languageService */ |
|
| 82 | + $languageService = GeneralUtility::makeInstance(LanguageFileGenerator::class); |
|
| 83 | + $languageFile = $languageService->generate($dataType); |
|
| 84 | + $icon = ''; |
|
| 85 | + } |
|
| 86 | + |
|
| 87 | + $pid = $defaultPids[$dataType] ?? $defaultPid; |
|
| 88 | + |
|
| 89 | + /** @var ModuleLoader $moduleLoader */ |
|
| 90 | + $moduleLoader->setIcon($icon) |
|
| 91 | + ->setModuleLanguageFile($languageFile) |
|
| 92 | + ->setDefaultPid($pid) |
|
| 93 | + ->register(); |
|
| 94 | + } |
|
| 95 | + } |
|
| 96 | + |
|
| 97 | + // Possible Static TS loading |
|
| 98 | + if (true === isset($configuration['autoload_typoscript']) && false === (bool)$configuration['autoload_typoscript']) { |
|
| 99 | + ExtensionManagementUtility::addStaticFile('vidi', 'Configuration/TypoScript', 'Vidi: versatile and interactive display'); |
|
| 100 | + } |
|
| 101 | + |
|
| 102 | + // Register List2 only if beta feature is enabled. |
|
| 103 | + // @todo let see what we do with that |
|
| 104 | + #if ($configuration['activate_beta_features']) { |
|
| 105 | + # $labelFile = 'LLL:EXT:vidi/Resources/Private/Language/locallang_module.xlf'; |
|
| 106 | + # |
|
| 107 | + # if (!$configuration['hide_module_list']) { |
|
| 108 | + # $labelFile = 'LLL:EXT:vidi/Resources/Private/Language/locallang_module_transitional.xlf'; |
|
| 109 | + # } |
|
| 110 | + # |
|
| 111 | + # \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( |
|
| 112 | + # 'vidi', |
|
| 113 | + # 'web', // Make module a submodule of 'web' |
|
| 114 | + # 'm1', // Submodule key |
|
| 115 | + # 'after:list', // Position |
|
| 116 | + # array( |
|
| 117 | + # 'Content' => 'index, list, delete, update, edit, copy, move, localize, sort, copyClipboard, moveClipboard', |
|
| 118 | + # 'Tool' => 'welcome, work', |
|
| 119 | + # 'Facet' => 'autoSuggest, autoSuggests', |
|
| 120 | + # 'Selection' => 'edit, update, create, delete, list, show', |
|
| 121 | + # 'UserPreferences' => 'save', |
|
| 122 | + # 'Clipboard' => 'save, flush, show', |
|
| 123 | + # ), array( |
|
| 124 | + # 'access' => 'user,group', |
|
| 125 | + # 'icon' => 'EXT:vidi/Resources/Public/Images/list.png', |
|
| 126 | + # 'labels' => $labelFile, |
|
| 127 | + # ) |
|
| 128 | + # ); |
|
| 129 | + #} |
|
| 130 | + #if ($configuration['hide_module_list']) { |
|
| 131 | + # |
|
| 132 | + # // Default User TSConfig to be added in any case. |
|
| 133 | + # TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(' |
|
| 134 | + # |
|
| 135 | + # # Hide the module in the BE. |
|
| 136 | + # options.hideModules.web := addToList(list) |
|
| 137 | + # '); |
|
| 138 | + #} |
|
| 139 | + |
|
| 140 | + /** @var $signalSlotDispatcher \TYPO3\CMS\Extbase\SignalSlot\Dispatcher */ |
|
| 141 | + $signalSlotDispatcher = GeneralUtility::makeInstance(Dispatcher::class); |
|
| 142 | + |
|
| 143 | + // Connect "processContentData" signal slot with the "ContentObjectProcessor". |
|
| 144 | + $signalSlotDispatcher->connect( |
|
| 145 | + 'Fab\Vidi\Controller\Backend\ContentController', |
|
| 146 | + 'processContentData', |
|
| 147 | + ContentObjectProcessor::class, |
|
| 148 | + 'processRelations', |
|
| 149 | + true |
|
| 150 | + ); |
|
| 151 | + |
|
| 152 | + // Connect "processContentData" signal with the "MarkerProcessor". |
|
| 153 | + $signalSlotDispatcher->connect( |
|
| 154 | + 'Fab\Vidi\Controller\Backend\ContentController', |
|
| 155 | + 'processContentData', |
|
| 156 | + MarkerProcessor::class, |
|
| 157 | + 'processMarkers', |
|
| 158 | + true |
|
| 159 | + ); |
|
| 160 | + |
|
| 161 | + // Register default Tools for Vidi. |
|
| 162 | + ToolRegistry::getInstance()->register('*', ModulePreferencesTool::class); |
|
| 163 | + ToolRegistry::getInstance()->register('*', RelationAnalyserTool::class); |
|
| 164 | + ToolRegistry::getInstance()->register('*', ConfiguredPidTool::class); |
|
| 165 | + |
|
| 166 | + // Add new sprite icon. |
|
| 167 | + $icons = [ |
|
| 168 | + 'go' => 'EXT:vidi/Resources/Public/Images/bullet_go.png', |
|
| 169 | + 'query' => 'EXT:vidi/Resources/Public/Images/drive_disk.png', |
|
| 170 | + ]; |
|
| 171 | + /** @var IconRegistry $iconRegistry */ |
|
| 172 | + $iconRegistry = GeneralUtility::makeInstance(IconRegistry::class); |
|
| 173 | + foreach ($icons as $key => $icon) { |
|
| 174 | + $iconRegistry->registerIcon( |
|
| 175 | + 'extensions-vidi-' . $key, |
|
| 176 | + BitmapIconProvider::class, |
|
| 177 | + [ |
|
| 178 | + 'source' => $icon |
|
| 179 | + ] |
|
| 180 | + ); |
|
| 181 | + } |
|
| 182 | + unset($iconRegistry); |
|
| 183 | 183 | }); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | defined('TYPO3') or die(); |
| 19 | 19 | |
| 20 | -call_user_func(function () { |
|
| 20 | +call_user_func(function() { |
|
| 21 | 21 | // Check from Vidi configuration what default module should be loaded. |
| 22 | 22 | // Make sure the class exists to avoid a Runtime Error |
| 23 | 23 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | $iconRegistry = GeneralUtility::makeInstance(IconRegistry::class); |
| 173 | 173 | foreach ($icons as $key => $icon) { |
| 174 | 174 | $iconRegistry->registerIcon( |
| 175 | - 'extensions-vidi-' . $key, |
|
| 175 | + 'extensions-vidi-'.$key, |
|
| 176 | 176 | BitmapIconProvider::class, |
| 177 | 177 | [ |
| 178 | 178 | 'source' => $icon |
@@ -22,51 +22,51 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | class VidiCommand extends Command |
| 24 | 24 | { |
| 25 | - /** |
|
| 26 | - * Configure the command by defining the name, options and arguments |
|
| 27 | - */ |
|
| 28 | - protected function configure() |
|
| 29 | - { |
|
| 30 | - $this->setDescription('Check TCA configuration for relations used in grid.') |
|
| 31 | - ->addOption( |
|
| 32 | - 'table', |
|
| 33 | - 'c', |
|
| 34 | - InputOption::VALUE_NONE, |
|
| 35 | - 'The table name. If not defined check for every table.' |
|
| 36 | - ); |
|
| 37 | - } |
|
| 25 | + /** |
|
| 26 | + * Configure the command by defining the name, options and arguments |
|
| 27 | + */ |
|
| 28 | + protected function configure() |
|
| 29 | + { |
|
| 30 | + $this->setDescription('Check TCA configuration for relations used in grid.') |
|
| 31 | + ->addOption( |
|
| 32 | + 'table', |
|
| 33 | + 'c', |
|
| 34 | + InputOption::VALUE_NONE, |
|
| 35 | + 'The table name. If not defined check for every table.' |
|
| 36 | + ); |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @param InputInterface $input |
|
| 41 | - * @param OutputInterface $output |
|
| 42 | - */ |
|
| 43 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 44 | - { |
|
| 45 | - $io = new SymfonyStyle($input, $output); |
|
| 46 | - foreach ($GLOBALS['TCA'] as $tableName => $TCA) { |
|
| 47 | - $table = $input->getOption('table'); |
|
| 48 | - if ($table !== '' && $table !== $tableName) { |
|
| 49 | - continue; |
|
| 50 | - } |
|
| 39 | + /** |
|
| 40 | + * @param InputInterface $input |
|
| 41 | + * @param OutputInterface $output |
|
| 42 | + */ |
|
| 43 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
| 44 | + { |
|
| 45 | + $io = new SymfonyStyle($input, $output); |
|
| 46 | + foreach ($GLOBALS['TCA'] as $tableName => $TCA) { |
|
| 47 | + $table = $input->getOption('table'); |
|
| 48 | + if ($table !== '' && $table !== $tableName) { |
|
| 49 | + continue; |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - $fields = Tca::grid($tableName)->getFields(); |
|
| 53 | - if (!empty($fields)) { |
|
| 54 | - $relations = $this->getGridAnalyserService()->checkRelationForTable($tableName); |
|
| 55 | - if (!empty($relations)) { |
|
| 56 | - $io->text(sprintf('Relations for "%s"', $tableName)); |
|
| 57 | - $io->text(implode("\n", $relations)); |
|
| 58 | - } |
|
| 59 | - } |
|
| 60 | - } |
|
| 61 | - } |
|
| 52 | + $fields = Tca::grid($tableName)->getFields(); |
|
| 53 | + if (!empty($fields)) { |
|
| 54 | + $relations = $this->getGridAnalyserService()->checkRelationForTable($tableName); |
|
| 55 | + if (!empty($relations)) { |
|
| 56 | + $io->text(sprintf('Relations for "%s"', $tableName)); |
|
| 57 | + $io->text(implode("\n", $relations)); |
|
| 58 | + } |
|
| 59 | + } |
|
| 60 | + } |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * Get the Vidi Module Loader. |
|
| 65 | - * |
|
| 66 | - * @return GridAnalyserService|object |
|
| 67 | - */ |
|
| 68 | - protected function getGridAnalyserService() |
|
| 69 | - { |
|
| 70 | - return GeneralUtility::makeInstance(GridAnalyserService::class); |
|
| 71 | - } |
|
| 63 | + /** |
|
| 64 | + * Get the Vidi Module Loader. |
|
| 65 | + * |
|
| 66 | + * @return GridAnalyserService|object |
|
| 67 | + */ |
|
| 68 | + protected function getGridAnalyserService() |
|
| 69 | + { |
|
| 70 | + return GeneralUtility::makeInstance(GridAnalyserService::class); |
|
| 71 | + } |
|
| 72 | 72 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * example: bin/typo3 vidi:analyseRelations |
| 7 | 7 | */ |
| 8 | 8 | return [ |
| 9 | - 'vidi:analyseRelations' => [ |
|
| 10 | - 'class' => VidiCommand::class |
|
| 11 | - ], |
|
| 9 | + 'vidi:analyseRelations' => [ |
|
| 10 | + 'class' => VidiCommand::class |
|
| 11 | + ], |
|
| 12 | 12 | ]; |