forked from rappasoft/laravel-livewire-tables
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Traits/Features/Configuration/TableCaptionConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Rappasoft\LaravelLivewireTables\Traits\Features\Configuration; | ||
|
||
trait TableCaptionConfiguration | ||
{ | ||
public function setTableCaptionMessage(string $tableCaptionMessage): self | ||
{ | ||
$this->tableCaptionMessage = $tableCaptionMessage; | ||
|
||
return $this; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Rappasoft\LaravelLivewireTables\Traits\Features; | ||
|
||
use Rappasoft\LaravelLivewireTables\Traits\Features\Configuration\TableCaptionConfiguration; | ||
use Rappasoft\LaravelLivewireTables\Traits\Features\Helpers\TableCaptionHelpers; | ||
|
||
trait HasTableCaption | ||
{ | ||
use TableCaptionConfiguration, | ||
TableCaptionHelpers; | ||
|
||
protected ?string $tableCaptionMessage; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Rappasoft\LaravelLivewireTables\Traits\Features\Helpers; | ||
|
||
use Livewire\Attributes\Computed; | ||
|
||
trait TableCaptionHelpers | ||
{ | ||
public function hasTableCaptionMessage(): bool | ||
{ | ||
return isset($this->tableCaptionMessage); | ||
} | ||
|
||
#[Computed] | ||
public function getTableCaptionMessage(): string | ||
{ | ||
return $this->hasTableCaptionMessage() ? $this->tableCaptionMessage : ''; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters