Aggregate.php
3 days ago
BeaverBuilderGroups.php
3 days ago
BuddyPressGroups.php
3 days ago
DefaultGroups.php
3 days ago
EventsCalendarGroups.php
3 days ago
GravityFormsGroups.php
3 days ago
JetEngineGroups.php
3 days ago
MediaLibraryAssistantGroups.php
3 days ago
MetaBoxGroups.php
3 days ago
WooCommerceGroups.php
3 days ago
JetEngineGroups.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Admin\MenuGroupFactory; |
| 6 | |
| 7 | use AC\Admin\MenuGroupFactory; |
| 8 | use AC\Admin\Type\MenuGroup; |
| 9 | use AC\PostType; |
| 10 | use AC\TableScreen; |
| 11 | |
| 12 | class JetEngineGroups implements MenuGroupFactory |
| 13 | { |
| 14 | public function create(TableScreen $table_screen): ?MenuGroup |
| 15 | { |
| 16 | if ( |
| 17 | $table_screen instanceof PostType && |
| 18 | $table_screen->get_post_type()->equals('jet-engine') |
| 19 | ) { |
| 20 | return new MenuGroup('jet-engine', 'JetEngine', 14); |
| 21 | } |
| 22 | |
| 23 | return null; |
| 24 | } |
| 25 | |
| 26 | } |
| 27 |