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

heimrichhannot / contao-utils-bundle / 6493786151

12 Oct 2023 09:23AM UTC coverage: 21.909% (-0.2%) from 22.128%
6493786151

push

github

web-flow
Add new dca author field mechanic (#69)

* add new author field mechanic and deprecate DcaUtil::addAuthorFieldAndCallback()

* adjust readme

54 of 54 new or added lines in 2 files covered. (100.0%)

1196 of 5459 relevant lines covered (21.91%)

1.55 hits per line

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

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

3
namespace HeimrichHannot\UtilsBundle\Dca;
4

5
class AuthorField
6
{
7
    public const TYPE_USER = 'user';
8
    public const TYPE_MEMBER = 'member';
9

10
    protected static array $tables = [];
11

12
    /**
13
     * Register a dca to have an author field and update logic added.
14
     *
15
     * @param string $table
16
     * @param array{
17
     *     type?: string,
18
     *     fieldNamePrefix?: string,
19
     *     useDefaultLabel?: bool,
20
     *     exclude?: bool,
21
     *     search?: bool,
22
     *     filter?: bool,
23
     * } $options
24
     * @return void
25
     */
26
    public static function register(string $table, array $options = []): void
27
    {
28
        static::$tables[$table] = $options;
×
29
    }
30

31
    public static function getRegistrations(): array
32
    {
33
        return static::$tables;
×
34
    }
35
}
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

© 2026 Coveralls, Inc