Revision ed3e8fa8
Von Sven Schöling vor etwa 7 Jahren hinzugefügt
SL/DB/CustomVariableConfig.pm | ||
---|---|---|
sub processed_options {
|
||
my ($self) = @_;
|
||
|
||
if( exists($self->{processed_options_cache}) ) {
|
||
return $self->{processed_options_cache};
|
||
}
|
||
return $self->{processed_options_cache} if $self->{processed_options_cache};
|
||
|
||
my $ops = $self->options;
|
||
my $ret;
|
||
... | ... | |
sub processed_flags {
|
||
my ($self) = @_;
|
||
|
||
if( exists($self->{processed_flags_cache}) ) {
|
||
return $self->{processed_flags_cache};
|
||
}
|
||
return $self->{processed_flags_cache} if $self->{processed_flags_cache};
|
||
|
||
my $flags = $self->flags;
|
||
my $ret = {};
|
||
... | ... | |
}
|
||
|
||
sub has_flag {
|
||
my ($self, $flag) = @_;
|
||
|
||
return $self->processed_flags()->{$flag};
|
||
$_[0]->processed_flags->{$_[1]};
|
||
}
|
||
|
||
sub type_dependent_default_value {
|
||
... | ... | |
return (any { $_ eq $self->default_value } @{ $self->processed_options }) ? $self->default_value : $self->processed_options->[0];
|
||
}
|
||
|
||
sub textarea_options {
|
||
my $options = $_[0]->processed_options;
|
||
|
||
cols => $options->{WIDTH},
|
||
rows => $options->{HEIGHT}
|
||
}
|
||
|
||
sub text_options {
|
||
maxlength => $_[0]->processed_options->{MAXLENGTH}
|
||
}
|
||
|
||
sub number_options {
|
||
precision => $_[0]->processed_options->{PRECISION}
|
||
}
|
||
|
||
sub value_col {
|
||
my ($self) = @_;
|
||
|
Auch abrufbar als: Unified diff
CustomVariableConfigs: hotpath micro optimierungen