Duffer Derek

Current Path : /home/webg5288/www/laravel_kendal/vendor/filament/forms/src/Concerns/
Upload File :
Current File : /home/webg5288/www/laravel_kendal/vendor/filament/forms/src/Concerns/CanBeDisabled.php

<?php

namespace Filament\Forms\Concerns;

use Closure;

trait CanBeDisabled
{
    protected bool | Closure $isDisabled = false;

    public function disabled(bool | Closure $condition = true): static
    {
        $this->isDisabled = $condition;

        return $this;
    }

    public function isDisabled(): bool
    {
        return $this->evaluate($this->isDisabled) || $this->getParentComponent()?->isDisabled();
    }

    public function isEnabled(): bool
    {
        return ! $this->isDisabled();
    }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists