Acf
3 months ago
Admin
3 months ago
Ajax
3 months ago
ApplyFilter
3 months ago
Asset
3 months ago
Capabilities
3 months ago
Check
3 months ago
Collection
3 months ago
Column
3 months ago
ColumnFactories
3 months ago
ColumnFactory
3 months ago
ColumnIterator
3 months ago
ColumnRepository
3 months ago
ColumnSize
3 months ago
DI
3 months ago
Deprecated
3 months ago
Entity
3 months ago
Exception
3 months ago
Expression
3 months ago
Form
3 months ago
Formatter
3 months ago
Helper
3 months ago
Integration
3 months ago
ListScreenRepository
3 months ago
ListTable
3 months ago
Message
3 months ago
Meta
3 months ago
Nonce
3 months ago
Notice
3 months ago
Plugin
3 months ago
Preferences
3 months ago
Promo
3 months ago
Request
3 months ago
RequestHandler
3 months ago
Response
3 months ago
Sanitize
3 months ago
Service
3 months ago
Setting
3 months ago
Settings
3 months ago
Storage
3 months ago
Table
3 months ago
TableIdsFactory
3 months ago
TableScreen
3 months ago
TableScreenFactory
3 months ago
ThirdParty
3 months ago
Type
3 months ago
Value
3 months ago
View
3 months ago
AdminColumns.php
3 months ago
ArrayIterator.php
3 months ago
Capabilities.php
3 months ago
Collection.php
3 months ago
CollectionFormatter.php
3 months ago
Column.php
3 months ago
ColumnCollection.php
3 months ago
ColumnFactoryCollectionFactory.php
3 months ago
ColumnFactoryDefinitionCollection.php
3 months ago
ColumnGroups.php
3 months ago
ColumnIterator.php
3 months ago
ColumnNamesTrait.php
3 months ago
ColumnRepository.php
3 months ago
ColumnTypeRepository.php
3 months ago
Config.php
3 months ago
Container.php
3 months ago
DateFormats.php
3 months ago
Expirable.php
3 months ago
Formatter.php
3 months ago
FormatterCollection.php
3 months ago
Helper.php
3 months ago
ListScreen.php
3 months ago
ListScreenCollection.php
3 months ago
ListScreenRepository.php
3 months ago
ListScreenRepositoryWritable.php
3 months ago
ListTable.php
3 months ago
ListTableFactory.php
3 months ago
Loader.php
3 months ago
Message.php
3 months ago
MetaType.php
3 months ago
Middleware.php
3 months ago
OpCacheInvalidateTrait.php
3 months ago
PluginActionLinks.php
3 months ago
PluginActionUpgrade.php
3 months ago
PostType.php
3 months ago
PostTypeRepository.php
3 months ago
Registerable.php
3 months ago
Registry.php
3 months ago
Renderable.php
3 months ago
Request.php
3 months ago
RequestAjaxHandler.php
3 months ago
RequestAjaxHandlers.php
3 months ago
RequestAjaxParser.php
3 months ago
RequestHandler.php
3 months ago
RequestHandlerFactory.php
3 months ago
Screen.php
3 months ago
Services.php
3 months ago
TableIdsFactory.php
3 months ago
TableScreen.php
3 months ago
TableScreenFactory.php
3 months ago
Taxonomy.php
3 months ago
Transient.php
3 months ago
TypedArrayIterator.php
3 months ago
View.php
3 months ago
WpListTableFactory.php
3 months ago
TableScreen.php
73 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC; |
| 6 | |
| 7 | use AC\Type\Labels; |
| 8 | use AC\Type\TableId; |
| 9 | use AC\Type\Uri; |
| 10 | use AC\Type\Url; |
| 11 | |
| 12 | class TableScreen |
| 13 | { |
| 14 | |
| 15 | protected TableId $id; |
| 16 | |
| 17 | protected string $screen_id; |
| 18 | |
| 19 | protected Labels $labels; |
| 20 | |
| 21 | private Url $url; |
| 22 | |
| 23 | protected bool $network; |
| 24 | |
| 25 | private ?string $attr_id; |
| 26 | |
| 27 | public function __construct( |
| 28 | TableId $id, |
| 29 | string $screen_id, |
| 30 | Labels $labels, |
| 31 | Uri $url, |
| 32 | ?string $attr_id = null, |
| 33 | bool $network = false |
| 34 | ) { |
| 35 | $this->id = $id; |
| 36 | $this->screen_id = $screen_id; |
| 37 | $this->labels = $labels; |
| 38 | $this->url = $url; |
| 39 | $this->network = $network; |
| 40 | $this->attr_id = $attr_id ?? '#the-list'; |
| 41 | } |
| 42 | |
| 43 | public function get_url(): Uri |
| 44 | { |
| 45 | return $this->url; |
| 46 | } |
| 47 | |
| 48 | public function get_id(): TableId |
| 49 | { |
| 50 | return $this->id; |
| 51 | } |
| 52 | |
| 53 | public function get_labels(): Labels |
| 54 | { |
| 55 | return $this->labels; |
| 56 | } |
| 57 | |
| 58 | public function get_screen_id(): string |
| 59 | { |
| 60 | return $this->screen_id; |
| 61 | } |
| 62 | |
| 63 | public function is_network(): bool |
| 64 | { |
| 65 | return $this->network; |
| 66 | } |
| 67 | |
| 68 | public function get_attr_id(): string |
| 69 | { |
| 70 | return $this->attr_id; |
| 71 | } |
| 72 | |
| 73 | } |