| 1 |
<?php |
| 2 |
|
| 3 |
namespace Give\FormMigration\DataTransferObjects; |
| 4 |
|
| 5 |
class DesignHeaderSettings |
| 6 |
{ |
| 7 |
/** @var bool */ |
| 8 |
protected $enabled; |
| 9 |
|
| 10 |
/** @var string */ |
| 11 |
protected $heading; |
| 12 |
|
| 13 |
/** @var string */ |
| 14 |
protected $description; |
| 15 |
|
| 16 |
public function __construct($enabled, $heading, $description) |
| 17 |
{ |
| 18 |
$this->enabled = give_is_setting_enabled($enabled); |
| 19 |
$this->heading = $heading; |
| 20 |
$this->description = $description; |
| 21 |
} |
| 22 |
|
| 23 |
public function isEnabled(): bool |
| 24 |
{ |
| 25 |
return $this->enabled; |
| 26 |
} |
| 27 |
|
| 28 |
public function hasHeading(): bool |
| 29 |
{ |
| 30 |
return !empty($this->getHeading()); |
| 31 |
} |
| 32 |
|
| 33 |
public function getHeading(): string |
| 34 |
{ |
| 35 |
return $this->heading; |
| 36 |
} |
| 37 |
|
| 38 |
public function hasDescription(): bool |
| 39 |
{ |
| 40 |
return !empty($this->getDescription()); |
| 41 |
} |
| 42 |
|
| 43 |
public function getDescription(): string |
| 44 |
{ |
| 45 |
return $this->description; |
| 46 |
} |
| 47 |
} |
| 48 |
|