PluginProbe
404 Solution / 4.3.3
404 Solution v4.3.3
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / view / OptionsSectionView.php

OptionsSectionView.php in 404 Solution 4.3.3, at includes/view/OptionsSectionView.php

58 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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