| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* Parameter object for the collapsible admin options-section renderer, |
| 9 |
* {@see ABJ_404_Solution_View_AdminChrome::echoOptionsSection()}. |
| 10 |
* |
| 11 |
* Replaces a 7-positional-parameter method signature (criterion 220 |
| 12 |
* Interface Size). Plain data carrier read directly by the consumer. |
| 13 |
*/ |
| 14 |
// allow-no-test-found: pure parameter-object DTO (typed public fields, constructor-only assignment, no behavior); fields consumed by View_AdminChrome::echoOptionsSection(), exercised when the stats/options page renders in ViewStatsPageTest and StatsRefreshWiringTest. |
| 15 |
class ABJ_404_Solution_OptionsSectionView { |
| 16 |
|
| 17 |
/** @var string */ |
| 18 |
public string $sectionId; |
| 19 |
|
| 20 |
/** @var string */ |
| 21 |
public string $postboxId; |
| 22 |
|
| 23 |
/** @var string */ |
| 24 |
public string $title; |
| 25 |
|
| 26 |
/** @var string */ |
| 27 |
public string $content; |
| 28 |
|
| 29 |
/** @var bool */ |
| 30 |
public bool $initiallyVisible; |
| 31 |
|
| 32 |
/** @var string */ |
| 33 |
public string $icon; |
| 34 |
|
| 35 |
/** @var string */ |
| 36 |
public string $badge; |
| 37 |
|
| 38 |
/** |
| 39 |
* @param string $sectionId |
| 40 |
* @param string $postboxId |
| 41 |
* @param string $title |
| 42 |
* @param string $content |
| 43 |
* @param bool $initiallyVisible |
| 44 |
* @param string $icon |
| 45 |
* @param string $badge |
| 46 |
*/ |
| 47 |
public function __construct(string $sectionId, string $postboxId, string $title, string $content, |
| 48 |
bool $initiallyVisible = false, string $icon = '', string $badge = '') { |
| 49 |
$this->sectionId = $sectionId; |
| 50 |
$this->postboxId = $postboxId; |
| 51 |
$this->title = $title; |
| 52 |
$this->content = $content; |
| 53 |
$this->initiallyVisible = $initiallyVisible; |
| 54 |
$this->icon = $icon; |
| 55 |
$this->badge = $badge; |
| 56 |
} |
| 57 |
} |
| 58 |
|