Aggregate.php
5 months ago
BaseFactory.php
5 months ago
CommentFactory.php
5 months ago
IntegrationFactory.php
5 months ago
MediaFactory.php
5 months ago
OriginalFactory.php
5 months ago
PostFactory.php
5 months ago
ThirdPartyFactory.php
5 months ago
UserFactory.php
5 months ago
CommentFactory.php
51 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\ColumnFactories; |
| 6 | |
| 7 | use AC; |
| 8 | use AC\ColumnFactory\Comment; |
| 9 | use AC\ColumnFactoryDefinitionCollection; |
| 10 | use AC\TableScreen; |
| 11 | |
| 12 | final class CommentFactory extends BaseFactory |
| 13 | { |
| 14 | |
| 15 | protected function get_factories(TableScreen $table_screen): ColumnFactoryDefinitionCollection |
| 16 | { |
| 17 | $collection = new ColumnFactoryDefinitionCollection(); |
| 18 | |
| 19 | if ( ! $table_screen instanceof AC\TableScreen\Comment) { |
| 20 | return $collection; |
| 21 | } |
| 22 | |
| 23 | $factories = [ |
| 24 | AC\ColumnFactory\ActionsFactory::class, |
| 25 | AC\ColumnFactory\CustomFieldFactory::class, |
| 26 | Comment\AgentFactory::class, |
| 27 | Comment\ApprovedFactory::class, |
| 28 | Comment\AuthorAvatarFactory::class, |
| 29 | Comment\AuthorEmailFactory::class, |
| 30 | Comment\AuthorIpFactory::class, |
| 31 | Comment\AuthorNameFactory::class, |
| 32 | Comment\AuthorUrlFactory::class, |
| 33 | Comment\CommentTypeFactory::class, |
| 34 | Comment\DateGmtFactory::class, |
| 35 | Comment\ExcerptFactory::class, |
| 36 | Comment\IdFactory::class, |
| 37 | Comment\PostFactory::class, |
| 38 | Comment\ReplyToFactory::class, |
| 39 | Comment\StatusFactory::class, |
| 40 | Comment\UserFactory::class, |
| 41 | Comment\WordCountFactory::class, |
| 42 | ]; |
| 43 | |
| 44 | foreach ($factories as $factory) { |
| 45 | $collection->add(new AC\Type\ColumnFactoryDefinition($factory)); |
| 46 | } |
| 47 | |
| 48 | return $collection; |
| 49 | } |
| 50 | |
| 51 | } |