| Total Complexity | 5 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class FeatureTextList extends AbstractFeature |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @ORM\Column() |
||
| 21 | * @Groups({"component", "content"}) |
||
| 22 | * @var null|string |
||
| 23 | */ |
||
| 24 | protected $title; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @ORM\Column() |
||
| 28 | * @Groups({"component", "content"}) |
||
| 29 | * @var int |
||
| 30 | */ |
||
| 31 | protected $columns = 3; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param ClassMetadata $metadata |
||
| 35 | */ |
||
| 36 | public static function loadValidatorMetadata(ClassMetadata $metadata): void |
||
| 37 | { |
||
| 38 | $metadata->addPropertyConstraint( |
||
| 39 | 'columns', |
||
| 40 | new Assert\Range( |
||
| 41 | [ |
||
| 42 | 'min' => 1, |
||
| 43 | 'minMessage' => 'The FeatureColumns component must have at least 1 column' |
||
| 44 | ] |
||
| 45 | ) |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return null|string |
||
| 51 | */ |
||
| 52 | public function getTitle(): ?string |
||
| 53 | { |
||
| 54 | return $this->title; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param null|string $title |
||
| 59 | */ |
||
| 60 | public function setTitle(?string $title): void |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return int |
||
| 67 | */ |
||
| 68 | public function getColumns(): int |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @param int $columns |
||
| 75 | */ |
||
| 76 | public function setColumns(int $columns): void |
||
| 79 | } |
||
| 80 | } |
||
| 81 |