• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

heimrichhannot / contao-utils-bundle / 15140811854

20 May 2025 02:51PM UTC coverage: 25.295% (-0.1%) from 25.433%
15140811854

Pull #101

github

koertho
add alias field
Pull Request #101: Add alias field

6 of 53 new or added lines in 4 files covered. (11.32%)

1503 of 5942 relevant lines covered (25.29%)

1.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Dca/AliasField.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\Dca;
4

5
use HeimrichHannot\UtilsBundle\EventListener\DcaField\AliasDcaFieldListener;
6

7
class AliasField extends AbstractDcaField
8
{
9
    private static $tables = [];
10

11
    protected static function storeConfig(DcaFieldConfiguration $config): void
12
    {
NEW
13
        static::$tables[$config->getTable()] = $config;
×
14
    }
15

16
    protected static function loadConfig(): array
17
    {
NEW
18
        return static::$tables;
×
19
    }
20

21
    protected static function createOptionObject(string $table): DcaFieldConfiguration
22
    {
NEW
23
        return new AliasFieldConfiguration($table);
×
24
    }
25

26
    public static function getField(): array
27
    {
NEW
28
        return [
×
NEW
29
            'label' => &$GLOBALS['TL_LANG']['MSC']['alias'],
×
NEW
30
            'exclude' => true,
×
NEW
31
            'search' => true,
×
NEW
32
            'inputType' => 'text',
×
NEW
33
            'eval' => ['rgxp' => 'alias', 'unique' => true, 'maxlength' => 128, 'tl_class' => 'w50'],
×
NEW
34
            'save_callback' => [],
×
NEW
35
            'sql' => "varchar(255) BINARY NOT NULL default ''",
×
NEW
36
        ];
×
37
    }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc