| Total Complexity | 5 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Coverage | 61.53% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class FeatureStackedItem extends AbstractFeatureItem implements FileInterface |
||
| 19 | { |
||
| 20 | use FileTrait; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @ORM\Column() |
||
| 24 | * @Groups({"component", "content"}) |
||
| 25 | * @var null|string |
||
| 26 | */ |
||
| 27 | protected $buttonText; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @ORM\Column() |
||
| 31 | * @Groups({"component", "content"}) |
||
| 32 | * @var null|string |
||
| 33 | */ |
||
| 34 | protected $buttonClass; |
||
| 35 | |||
| 36 | public static function loadValidatorMetadata(ClassMetadata $metadata) |
||
| 37 | { |
||
| 38 | $metadata->addPropertyConstraint( |
||
| 39 | 'description', |
||
| 40 | new Assert\NotBlank() |
||
| 41 | ); |
||
| 42 | $metadata->addPropertyConstraint( |
||
| 43 | 'filePath', |
||
| 44 | new Assert\Image() |
||
| 45 | ); |
||
| 46 | 1 | } |
|
| 47 | |||
| 48 | 1 | /** |
|
| 49 | 1 | * @return null|string |
|
| 50 | 1 | */ |
|
| 51 | public function getButtonText(): ?string |
||
| 52 | 1 | { |
|
| 53 | 1 | return $this->buttonText; |
|
| 54 | 1 | } |
|
| 55 | |||
| 56 | 1 | public function setButtonText(?string $buttonText): self |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return null|string |
||
| 64 | */ |
||
| 65 | public function getButtonClass(): ?string |
||
| 66 | { |
||
| 67 | return $this->buttonClass; |
||
| 68 | } |
||
| 69 | |||
| 70 | public function setButtonClass(?string $buttonClass): self |
||
| 74 | } |
||
| 75 | } |
||
| 76 |