| 1 | <?php |
||
| 6 | |||
| 7 | trait DescriptionPart { |
||
| 8 | |||
| 9 | /** @var string|null */ |
||
| 10 | private $description; |
||
| 11 | 12 | ||
| 12 | 12 | private function parseDescription(Map $data) { |
|
| 13 | 12 | $this->description = $data->get('description'); |
|
| 14 | } |
||
| 15 | |||
| 16 | private function mergeDescription(static $model, $overwrite = false) { |
||
|
|
|||
| 17 | MergeHelper::mergeFields($this->description, $model->description, $overwrite); |
||
| 18 | } |
||
| 19 | 1 | ||
| 20 | 1 | /** |
|
| 21 | * |
||
| 22 | * @return string|null |
||
| 23 | */ |
||
| 24 | public function getDescription() { |
||
| 25 | return $this->description; |
||
| 26 | } |
||
| 27 | |||
| 28 | 1 | /** |
|
| 29 | 1 | * |
|
| 30 | 1 | * @param string|null $description |
|
| 31 | * @return $this |
||
| 32 | */ |
||
| 33 | public function setDescription($description) { |
||
| 34 | $this->description = $description; |
||
| 39 |