File tree Expand file tree Collapse file tree 3 files changed +24
-12
lines changed Expand file tree Collapse file tree 3 files changed +24
-12
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rappasoft \LaravelLivewireTables \Views \Columns \Traits ;
4+
5+ use Rappasoft \LaravelLivewireTables \DataTableComponent ;
6+
7+ trait HasDataTableComponent
8+ {
9+ protected ?DataTableComponent $ component = null ;
10+
11+ public function setComponent (DataTableComponent $ component ): self
12+ {
13+ $ this ->component = $ component ;
14+
15+ return $ this ;
16+ }
17+
18+ public function getComponent (): ?DataTableComponent
19+ {
20+ return $ this ->component ;
21+ }
22+ }
Original file line number Diff line number Diff line change 33namespace Rappasoft \LaravelLivewireTables \Views \Columns \Traits \Helpers ;
44
55use Illuminate \Database \Eloquent \Model ;
6- use Illuminate \Support \HtmlString ;
7- use Illuminate \Support \Str ;
8- use Rappasoft \LaravelLivewireTables \DataTableComponent ;
6+ use Illuminate \Support \{HtmlString ,Str };
97use Rappasoft \LaravelLivewireTables \Exceptions \DataTableConfigurationException ;
108use Rappasoft \LaravelLivewireTables \Views \Column ;
119use Rappasoft \LaravelLivewireTables \Views \Columns \LinkColumn ;
1210
1311trait ColumnHelpers
1412{
15- // Defunct and unused
16- /*public function getComponent(): ?DataTableComponent
17- {
18- return $this->component;
19- }*/
2013
2114 public function hasFrom (): bool
2215 {
Original file line number Diff line number Diff line change 22
33namespace Rappasoft \LaravelLivewireTables \Views \Columns \Traits ;
44
5- use Rappasoft \LaravelLivewireTables \DataTableComponent ;
65use Rappasoft \LaravelLivewireTables \Traits \Core \HasLocalisations ;
76use Rappasoft \LaravelLivewireTables \Views \Columns \Traits \Configuration \ColumnConfiguration ;
87use Rappasoft \LaravelLivewireTables \Views \Columns \Traits \Helpers \{ColumnHelpers ,RelationshipHelpers };
1211trait IsColumn
1312{
1413 use HasLocalisations,
14+ HasDataTableComponent,
1515 ColumnConfiguration,
1616 ColumnHelpers,
1717 RelationshipHelpers,
@@ -27,9 +27,6 @@ trait IsColumn
2727 HasTheme,
2828 HasVisibility;
2929
30- // Defunct and unused
31- // protected ?DataTableComponent $component = null;
32-
3330 // What displays in the columns header
3431 protected string $ title ;
3532
You can’t perform that action at this time.
0 commit comments