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
ThirdPartyFactory.php
49 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\ColumnFactories; |
| 6 | |
| 7 | use AC\ColumnFactoryDefinitionCollection; |
| 8 | use AC\TableScreen; |
| 9 | use AC\Type\ColumnFactoryDefinition; |
| 10 | |
| 11 | final class ThirdPartyFactory extends BaseFactory |
| 12 | { |
| 13 | |
| 14 | protected function get_factories(TableScreen $table_screen): ColumnFactoryDefinitionCollection |
| 15 | { |
| 16 | $collection = new ColumnFactoryDefinitionCollection(); |
| 17 | |
| 18 | $factory_classes = apply_filters('ac/column/types', [], $table_screen, $this->container); |
| 19 | |
| 20 | /** |
| 21 | * @deprecated 7.0.10 |
| 22 | */ |
| 23 | $factory_classes = apply_filters_deprecated( |
| 24 | 'ac/column/types/pro', |
| 25 | [ |
| 26 | $factory_classes, |
| 27 | $table_screen, |
| 28 | ], |
| 29 | '7.0.10', |
| 30 | 'ac/column/types' |
| 31 | ); |
| 32 | |
| 33 | foreach ($factory_classes as $factory => $props) { |
| 34 | if (is_numeric($factory)) { |
| 35 | $factory = $props; |
| 36 | $props = []; |
| 37 | } |
| 38 | |
| 39 | $collection->add( |
| 40 | new ColumnFactoryDefinition( |
| 41 | $factory, $props |
| 42 | ) |
| 43 | ); |
| 44 | } |
| 45 | |
| 46 | return $collection; |
| 47 | } |
| 48 | |
| 49 | } |