Changeset 1530 for trunk/LATMOS-Accounts/lib/LATMOS/Accounts
- Timestamp:
- 12/23/15 16:54:28 (9 years ago)
- Location:
- trunk/LATMOS-Accounts/lib/LATMOS/Accounts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r1503 r1530 417 417 } 418 418 419 =head2 defaultAttributeValue($otype, $attr) 420 421 Return default static value for attribute C<$attr> 422 423 =cut 424 425 sub defaultAttributeValue { 426 my ($self, $otype, $attr) = @_; 427 428 warn "$otype, $attr"; 429 my %def = %{ $self->{defattr} || {}}; 430 return $def{"$otype.$attr"} || ''; 431 } 419 432 420 433 =head2 compute_default($otype, $id, %cdata) -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm
r1456 r1530 451 451 } 452 452 453 =head2 defaultValue 454 455 Return the default static value for this attribute. 456 457 =cut 458 459 sub defaultValue { 460 my ($self) = @_; 461 462 return $self->base->defaultAttributeValue($self->otype, $self->name) 463 } 464 453 465 =head2 getValues 454 466 … … 499 511 sub default_value { 500 512 my ($self) = @_; 501 return grep { $_ } (ref $self->{default} 502 ? @{ $self->{default} } 503 : $self->{default}); 513 $self->defaultValue; 504 514 } 505 515
Note: See TracChangeset
for help on using the changeset viewer.