Move uiLevel from a define to a property so it can be inherited.
This commit is contained in:
parent
029655d822
commit
a3614f5211
3 changed files with 7 additions and 13 deletions
|
|
@ -25,7 +25,6 @@ use WebGUI::Definition::Asset;
|
|||
define assetName => 'asset';
|
||||
define tableName => 'assetData';
|
||||
define icon => 'assets.gif';
|
||||
define uiLevel => 1;
|
||||
property title => (
|
||||
tab => "properties",
|
||||
label => ['99','Asset'],
|
||||
|
|
@ -273,6 +272,11 @@ has assetId => (
|
|||
has revisionDate => (
|
||||
is => 'rw',
|
||||
);
|
||||
has uiLevel => (
|
||||
is => 'ro',
|
||||
default => 1,
|
||||
init_arg => undef,
|
||||
);
|
||||
property revisedBy => (
|
||||
is => 'rw',
|
||||
noFormPost => 1,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ has 'property_metaroles' => (
|
|||
default => sub { [ 'WebGUI::Definition::Meta::Property', 'WebGUI::Definition::Meta::Property::Asset'] },
|
||||
);
|
||||
|
||||
has [ qw{tableName icon assetName uiLevel} ] => (
|
||||
has [ qw{tableName icon assetName} ] => (
|
||||
is => 'rw',
|
||||
);
|
||||
|
||||
|
|
@ -113,13 +113,4 @@ The second is the i18n namespace to find the asset's name.
|
|||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 uiLevel ( )
|
||||
|
||||
An integer, representing how difficult the Asset will be to use. The default uiLevel is
|
||||
1. uiLevels for an asset can be overridden in the config file for each site.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use lib "$FindBin::Bin/lib";
|
|||
|
||||
use WebGUI::Test;
|
||||
|
||||
use Test::More tests => 15;
|
||||
use Test::More tests => 16;
|
||||
use Test::Deep;
|
||||
use Test::Exception;
|
||||
|
||||
|
|
@ -48,7 +48,6 @@ my $session = WebGUI::Test->session;
|
|||
::can_ok +__PACKAGE__, 'get';
|
||||
::can_ok +__PACKAGE__, 'set';
|
||||
|
||||
::ok +__PACKAGE__->meta->does_role('WebGUI::Definition');
|
||||
::ok +__PACKAGE__->meta->does_role('WebGUI::Definition::Role::Object');
|
||||
|
||||
::cmp_deeply(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue