| @@ 42-61 (lines=20) @@ | ||
| 39 | $activePackages = GeneralUtility::makeInstance(PackageManager::class)->getActivePackages(); |
|
| 40 | ||
| 41 | // First load "full table" files from Configuration/TCA |
|
| 42 | foreach ($activePackages as $package) { |
|
| 43 | $tcaConfigurationDirectory = $package->getPackagePath() . 'Configuration/TCA'; |
|
| 44 | if (is_dir($tcaConfigurationDirectory)) { |
|
| 45 | $files = scandir($tcaConfigurationDirectory); |
|
| 46 | foreach ($files as $file) { |
|
| 47 | if (is_file($tcaConfigurationDirectory . '/' . $file) |
|
| 48 | && ($file !== '.') |
|
| 49 | && ($file !== '..') |
|
| 50 | && (substr($file, -4, 4) === '.php') |
|
| 51 | ) { |
|
| 52 | $tcaOfTable = require $tcaConfigurationDirectory . '/' . $file; |
|
| 53 | if (is_array($tcaOfTable)) { |
|
| 54 | // TCA table name is filename without .php suffix, eg 'sys_notes', not 'sys_notes.php' |
|
| 55 | $tcaTableName = substr($file, 0, -4); |
|
| 56 | $GLOBALS['TCA'][$tcaTableName] = $tcaOfTable; |
|
| 57 | } |
|
| 58 | } |
|
| 59 | } |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||
| 63 | // Apply category stuff |
|
| 64 | CategoryRegistry::getInstance()->applyTcaForPreRegisteredTables(); |
|
| @@ 1649-1669 (lines=21) @@ | ||
| 1646 | $activePackages = static::$packageManager->getActivePackages(); |
|
| 1647 | ||
| 1648 | // First load "full table" files from Configuration/TCA |
|
| 1649 | foreach ($activePackages as $package) { |
|
| 1650 | $tcaConfigurationDirectory = $package->getPackagePath() . 'Configuration/TCA'; |
|
| 1651 | if (is_dir($tcaConfigurationDirectory)) { |
|
| 1652 | $files = scandir($tcaConfigurationDirectory); |
|
| 1653 | foreach ($files as $file) { |
|
| 1654 | if ( |
|
| 1655 | is_file($tcaConfigurationDirectory . '/' . $file) |
|
| 1656 | && ($file !== '.') |
|
| 1657 | && ($file !== '..') |
|
| 1658 | && (substr($file, -4, 4) === '.php') |
|
| 1659 | ) { |
|
| 1660 | $tcaOfTable = require($tcaConfigurationDirectory . '/' . $file); |
|
| 1661 | if (is_array($tcaOfTable)) { |
|
| 1662 | // TCA table name is filename without .php suffix, eg 'sys_notes', not 'sys_notes.php' |
|
| 1663 | $tcaTableName = substr($file, 0, -4); |
|
| 1664 | $GLOBALS['TCA'][$tcaTableName] = $tcaOfTable; |
|
| 1665 | } |
|
| 1666 | } |
|
| 1667 | } |
|
| 1668 | } |
|
| 1669 | } |
|
| 1670 | ||
| 1671 | // Apply category stuff |
|
| 1672 | CategoryRegistry::getInstance()->applyTcaForPreRegisteredTables(); |
|