Skip to content

Display short name as a fallback in exception render#333

Merged
mvorisek merged 2 commits intodevelopfrom
shortname_ex_render
Nov 7, 2021
Merged

Display short name as a fallback in exception render#333
mvorisek merged 2 commits intodevelopfrom
shortname_ex_render

Conversation

@mvorisek
Copy link
Copy Markdown
Member

@mvorisek mvorisek commented Nov 5, 2021

display name of Field for example

return 'closure';
} elseif (is_object($val)) {
return get_class($val) . (\Atk4\Core\TraitUtil::hasTrackableTrait($val) ? ' (' . get_object_vars($val)['name'] . ')' : '');
return get_class($val) . (\Atk4\Core\TraitUtil::hasTrackableTrait($val) ? ' (' . (get_object_vars($val)['name'] ?? get_object_vars($val)['short_name']) . ')' : '');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably would be good to use \Atk4\Core\TraitUtil; and here just TraitUtil

@mvorisek mvorisek merged commit 16ec6b6 into develop Nov 7, 2021
@mvorisek mvorisek deleted the shortname_ex_render branch November 7, 2021 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants