Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| PromoStrip | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
20 | |
0.00% |
0 / 1 |
| label | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| icon | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| description | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| fields | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace App\Widgets\Types; |
| 3 | use App\Widgets\AbstractWidget; |
| 4 | class PromoStrip extends AbstractWidget { |
| 5 | protected string $view='widgets.promo-strip'; public function label():string{return 'Promotion strip';} public function icon():string{return 'fas fa-bullhorn';} public function description():string{return 'A full-width offer or announcement bar.';} |
| 6 | public function fields():array{return ['text'=>['type'=>'text','label'=>'Message','default'=>'Free delivery on eligible orders'],'link_text'=>['type'=>'text','label'=>'Link text','default'=>'Shop now'],'link'=>['type'=>'text','label'=>'Link','default'=>'/'],'background'=>['type'=>'color','label'=>'Background colour','default'=>'#111827'],'color'=>['type'=>'color','label'=>'Text colour','default'=>'#ffffff']];} |
| 7 | } |