| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | namespace Atk4\Ui; |
| 6: | |
| 7: | class WizardStep extends View |
| 8: | { |
| 9: | public $ui = 'step'; |
| 10: | public $defaultTemplate; |
| 11: | |
| 12: | |
| 13: | public $title; |
| 14: | |
| 15: | |
| 16: | public $description; |
| 17: | |
| 18: | |
| 19: | public $wizard; |
| 20: | |
| 21: | |
| 22: | public $icon; |
| 23: | |
| 24: | |
| 25: | public $sequence; |
| 26: | |
| 27: | |
| 28: | |
| 29: | |
| 30: | public function __construct($title) |
| 31: | { |
| 32: | parent::__construct(['title' => $title]); |
| 33: | } |
| 34: | |
| 35: | #[\Override] |
| 36: | protected function renderView(): void |
| 37: | { |
| 38: | $this->template->set('title', $this->title); |
| 39: | $this->template->set('description', $this->description); |
| 40: | |
| 41: | if ($this->icon === false) { |
| 42: | $this->template->del('hasIcon'); |
| 43: | } else { |
| 44: | $this->template->set('icon', $this->icon); |
| 45: | } |
| 46: | |
| 47: | parent::renderView(); |
| 48: | } |
| 49: | } |
| 50: | |