HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/posscale/www/printmanager/vendor/filament/forms/src/Components/Concerns/HasToggleIcons.php
<?php

namespace Filament\Forms\Components\Concerns;

use Closure;

trait HasToggleIcons
{
    protected string | Closure | null $offIcon = null;

    protected string | Closure | null $onIcon = null;

    public function offIcon(string | Closure | null $icon): static
    {
        $this->offIcon = $icon;

        return $this;
    }

    public function onIcon(string | Closure | null $icon): static
    {
        $this->onIcon = $icon;

        return $this;
    }

    public function getOffIcon(): ?string
    {
        return $this->evaluate($this->offIcon);
    }

    public function getOnIcon(): ?string
    {
        return $this->evaluate($this->onIcon);
    }

    public function hasOffIcon(): bool
    {
        return (bool) $this->getOffIcon();
    }

    public function hasOnIcon(): bool
    {
        return (bool) $this->getOnIcon();
    }
}