mirror of
https://github.com/flextype/flextype.git
synced 2025-08-06 05:07:41 +02:00
feat(directives): add ability to disable types using !types
This commit is contained in:
@@ -32,6 +32,10 @@ emitter()->addListener('onEntriesFetchSingleField', static function (): void {
|
||||
|
||||
$field = entries()->registry()->get('methods.fetch.field');
|
||||
|
||||
if (is_string($field['value']) && strings($field['value'])->contains('!types')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_string($field['value'])) {
|
||||
if (strings($field['value'])->contains('@type[integer]')) {
|
||||
$field['value'] = strings(strings($field['value'])->replace('@type[integer]', '')->trim())->toInteger();
|
||||
|
Reference in New Issue
Block a user