1- <?php
2-
3- namespace Rappasoft \LaravelLivewireTables \Traits \Styling \Helpers ;
4-
5- use Livewire \Attributes \Computed ;
6- use Illuminate \View \ComponentAttributeBag ;
7-
8- trait PaginationStylingHelpers
9- {
10- #[Computed]
11- public function getPaginationTheme (): string
12- {
13- return $ this ->paginationTheme ;
14- }
15-
16- #[Computed]
17- public function getPaginationWrapperAttributes (): array
18- {
19- return $ this ->getCustomAttributes (propertyName: 'paginationWrapperAttributes ' , default: false , classicMode: true );
20- }
21-
22- #[Computed]
23- public function getPaginationWrapperAttributesBag (): ComponentAttributeBag
24- {
25- return $ this ->getCustomAttributesBagFromArray ($ this ->getPaginationWrapperAttributes ());
26- }
27-
28-
29- #[Computed]
30- public function getPerPageFieldAttributes (): array
31- {
32- return $ this ->getCustomAttributes (propertyName: 'perPageFieldAttributes ' , default: false , classicMode: false );
33-
34- }
35-
36- #[Computed]
37- public function getPerPageFieldAttributesBag (): ComponentAttributeBag
38- {
39- return new ComponentAttributeBag ($ this ->getPerPageFieldAttributes ());
40- }
41-
42- #[Computed]
43- public function getPerPageWrapperAttributes (): array
44- {
45- return $ this ->getCustomAttributes (propertyName: 'perPageWrapperAttributes ' , default: false , classicMode: false );
46-
47- }
48-
49- #[Computed]
50- public function getPerPageWrapperAttributesBag (): ComponentAttributeBag
51- {
52- return new ComponentAttributeBag ($ this ->getPerPageWrapperAttributes ());
53- }
54-
55- #[Computed]
56- public function hasCustomPaginationBlade (): bool
57- {
58- return (isset ($ this ->customPaginationBlade ) && $ this ->customPaginationBlade !== null );
59- }
60-
61- #[Computed]
62- public function getCustomPaginationBlade (): string
63- {
64- return $ this ->customPaginationBlade ?? '' ;
65- }
66-
67- }
1+ <?php
2+
3+ namespace Rappasoft \LaravelLivewireTables \Traits \Styling \Helpers ;
4+
5+ use Illuminate \View \ComponentAttributeBag ;
6+ use Livewire \Attributes \Computed ;
7+
8+ trait PaginationStylingHelpers
9+ {
10+ #[Computed]
11+ public function getPaginationTheme (): string
12+ {
13+ return $ this ->paginationTheme ;
14+ }
15+
16+ #[Computed]
17+ public function getPaginationWrapperAttributes (): array
18+ {
19+ return $ this ->getCustomAttributes (propertyName: 'paginationWrapperAttributes ' , default: false , classicMode: true );
20+ }
21+
22+ #[Computed]
23+ public function getPaginationWrapperAttributesBag (): ComponentAttributeBag
24+ {
25+ return $ this ->getCustomAttributesBagFromArray ($ this ->getPaginationWrapperAttributes ());
26+ }
27+
28+ #[Computed]
29+ public function getPerPageFieldAttributes (): array
30+ {
31+ return $ this ->getCustomAttributes (propertyName: 'perPageFieldAttributes ' , default: false , classicMode: false );
32+
33+ }
34+
35+ #[Computed]
36+ public function getPerPageFieldAttributesBag (): ComponentAttributeBag
37+ {
38+ return new ComponentAttributeBag ($ this ->getPerPageFieldAttributes ());
39+ }
40+
41+ #[Computed]
42+ public function getPerPageWrapperAttributes (): array
43+ {
44+ return $ this ->getCustomAttributes (propertyName: 'perPageWrapperAttributes ' , default: false , classicMode: false );
45+
46+ }
47+
48+ #[Computed]
49+ public function getPerPageWrapperAttributesBag (): ComponentAttributeBag
50+ {
51+ return new ComponentAttributeBag ($ this ->getPerPageWrapperAttributes ());
52+ }
53+
54+ #[Computed]
55+ public function hasCustomPaginationBlade (): bool
56+ {
57+ return isset ($ this ->customPaginationBlade ) && $ this ->customPaginationBlade !== null ;
58+ }
59+
60+ #[Computed]
61+ public function getCustomPaginationBlade (): string
62+ {
63+ return $ this ->customPaginationBlade ?? '' ;
64+ }
65+ }
0 commit comments