| Total Complexity | 5 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | trait AspectTrait |
||
| 21 | { |
||
| 22 | protected function isSlugUniqueInSite(string $tableName, string $fieldName): bool |
||
| 23 | { |
||
| 24 | $configuration = $GLOBALS['TCA'][$tableName]['columns'][$fieldName]['config'] ?? null; |
||
| 25 | return |
||
| 26 | ($configuration['type'] ?? null) === 'slug' |
||
| 27 | && GeneralUtility::inList($configuration['eval'] ?? '', 'uniqueInSite'); |
||
| 28 | } |
||
| 29 | |||
| 30 | protected function hasSlugUniqueInSite(string $tableName, string ...$fieldNames): bool |
||
| 38 | } |
||
| 39 | } |
||
| 40 |