Skip to content

Commit

Permalink
Field Marcoable
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Dec 23, 2024
1 parent 294c1a8 commit 0e97e29
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Field/AbstractField.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Windwalker\Form\FormRegistry;
use Windwalker\Utilities\Arr;
use Windwalker\Utilities\Classes\FlowControlTrait;
use Windwalker\Utilities\Classes\MarcoableTrait;
use Windwalker\Utilities\Options\StateAccessTrait;
use Windwalker\Utilities\Str;

Expand Down Expand Up @@ -58,6 +59,10 @@ abstract class AbstractField
use ManageLabelTrait;
use ManageWrapperTrait;
use ManageRenderTrait;
use MarcoableTrait {
__call as callMarco;
__callStatic as callMarcoStatic;
}

/**
* Property name.
Expand Down Expand Up @@ -619,6 +624,10 @@ public function __call(string $method, array $args): mixed
return $is ? $v !== null && $v !== false : $v;
}

if (static::hasMacro($method)) {
return $this->callMarco($method, $args);
}

return $this->setAttribute($method, $args[0]);
// throw ExceptionFactory::badMethodCall($method, static::class);
}
Expand Down

0 comments on commit 0e97e29

Please sign in to comment.