| 1 |
<?php |
| 2 |
/** |
| 3 |
* Domain contract for catalog inline and bulk field definitions. |
| 4 |
* |
| 5 |
* @package Booking Calendar |
| 6 |
* @since 11.6.0 |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
/** |
| 14 |
* Require each catalog domain to expose editable fields through one API. |
| 15 |
* |
| 16 |
* Implementations remain domain-owned because field availability depends on |
| 17 |
* authorization, ownership, edition, and current row state. Returned fields |
| 18 |
* are executable-free presentation contracts; they are never mutation |
| 19 |
* authority and must be rebuilt during preview and apply. |
| 20 |
* |
| 21 |
* @since 11.6.0 |
| 22 |
*/ |
| 23 |
interface WPBC_UI_Catalog_Inline_Fields { |
| 24 |
|
| 25 |
/** |
| 26 |
* Return row-specific inline fields for one authorized domain record. |
| 27 |
* |
| 28 |
* @param array<string,mixed> $record Current authorized domain record. |
| 29 |
* @return array<int,array<string,mixed>> Executable-free field definitions. |
| 30 |
*/ |
| 31 |
public function get_inline_fields( $record ); |
| 32 |
|
| 33 |
/** |
| 34 |
* Return the safe field intersection for authorized domain records. |
| 35 |
* |
| 36 |
* @param array<int,array<string,mixed>> $records Current authorized records. |
| 37 |
* @return array<int,array<string,mixed>> Executable-free field definitions. |
| 38 |
*/ |
| 39 |
public function get_bulk_fields( $records ); |
| 40 |
} |
| 41 |
|