File manager - Edit - /home/linknsbh/cecil-hotel.net/vendor/botble/platform/table/src/Columns/Concerns/HasEmptyState.php
Back
<?php namespace Botble\Table\Columns\Concerns; use Closure; trait HasEmptyState { protected string $emptyState; protected Closure $emptyStateUsingCallback; public function withEmptyState(string $emptyState = '—'): static { $this->emptyState = $emptyState; return $this; } public function emptyStateUsing(Closure $callback): static { $this->emptyStateUsingCallback = $callback; return $this; } public function renderEmptyStateIfAvailable(string|null $default): string|null { $default = trim((string) $default); if (! isset($this->emptyState) || $default) { return $default; } if (isset($this->emptyStateUsingCallback)) { return call_user_func($this->emptyStateUsingCallback, $this); } return $this->emptyState; } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.17 |
proxy
|
phpinfo
|
Settings