allowing UI levels for assets to be overridden in the config file, and allowing developers to specify a default UI level in the definition rather than creating a getUiLevel() method
This commit is contained in:
parent
c9cefeca93
commit
c7864a0c24
15 changed files with 31 additions and 116 deletions
|
|
@ -1743,14 +1743,16 @@ sub getToolbarState {
|
|||
|
||||
=head2 getUiLevel ( )
|
||||
|
||||
Always returns zero.
|
||||
|
||||
=cut
|
||||
Returns the UI Level specified in the asset definition or from the config file if it's overridden. And if neither of those is specified, then it returns 1.
|
||||
|
||||
=cut
|
||||
|
||||
sub getUiLevel {
|
||||
my $self = shift;
|
||||
return 0;
|
||||
}
|
||||
my $self = shift;
|
||||
my $definition = $self->definition;
|
||||
return $session{config}{assetUiLevel}{$definition->[0]{className}} || $definition->[0]{uiLevel} || 1;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue