File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed
Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 33namespace Yuges \Contentable \Data \Blocks ;
44
55use Yuges \Contentable \Enums \BlockType ;
6+ use Yuges \Contentable \Interfaces \BlockType as BlockTypeInterface ;
67
78class DelimiterData extends \Yuges \Contentable \Abstracts \BlockData
89{
9- protected const DURATION = 0.5 ;
10-
11- public string $ type = BlockType::Delimiter->value ;
10+ protected const float DURATION = 0.5 ;
11+ protected const BlockTypeInterface TYPE = BlockType::Delimiter;
1212
1313 public function __construct () {
14+ parent ::__construct ();
1415 }
1516
1617 public function getData (): array
Original file line number Diff line number Diff line change 55use Yuges \Contentable \Config \Config ;
66use Yuges \Contentable \Enums \BlockType ;
77use Yuges \Contentable \Enums \HeaderLevel ;
8+ use Yuges \Contentable \Interfaces \BlockType as BlockTypeInterface ;
89
910class HeaderData extends \Yuges \Contentable \Abstracts \BlockData
1011{
11- public string $ type = BlockType::Header-> value ;
12+ protected const BlockTypeInterface TYPE = BlockType::Header;
1213
1314 public function __construct (
1415 public ?string $ text = '' ,
1516 public HeaderLevel $ level = HeaderLevel::Level3,
1617 ) {
18+ parent ::__construct ();
1719 }
1820
1921 public function getData (): array
Original file line number Diff line number Diff line change 55use Yuges \Contentable \Config \Config ;
66use Yuges \Contentable \Enums \BlockType ;
77use Yuges \Contentable \Enums \ListStyle ;
8+ use Yuges \Contentable \Interfaces \BlockType as BlockTypeInterface ;
89
910class ListData extends \Yuges \Contentable \Abstracts \BlockData
1011{
11- public string $ type = BlockType::List-> value ;
12+ protected const BlockTypeInterface TYPE = BlockType::List;
1213
1314 public function __construct (
1415 public ?array $ items = [],
1516 public ListStyle $ style = ListStyle::Unordered,
1617 ) {
18+ parent ::__construct ();
1719 }
1820
1921 public function getData (): array
Original file line number Diff line number Diff line change 55use Yuges \Contentable \Config \Config ;
66use Yuges \Contentable \Enums \Alignment ;
77use Yuges \Contentable \Enums \BlockType ;
8+ use Yuges \Contentable \Interfaces \BlockType as BlockTypeInterface ;
89
910class QuoteData extends \Yuges \Contentable \Abstracts \BlockData
1011{
11- public string $ type = BlockType::Quote-> value ;
12+ protected const BlockTypeInterface TYPE = BlockType::Quote;
1213
1314 public function __construct (
1415 public ?string $ text = '' ,
1516 public ?string $ caption = '' ,
1617 public Alignment $ alignment = Alignment::Left,
1718 ) {
19+ parent ::__construct ();
1820 }
1921
2022 public function getData (): array
You can’t perform that action at this time.
0 commit comments