Leser: 1
3 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
sub selection_extend {
my $self = shift;
my $result = shift || die "extend needs a resultset to extend\n";
my $db_lang = new DB::Languages;
my @languages = @{$db_lang->get()};
foreach my $person (@$result) {
my @selected_languages = map { $_->{'ID_language'} }
@{$self->get_attributes({'id' => $person->{'ID_person'}, 'attribute' => 'has_language_skill',})};
my @selection_list = map { my $cur_lang = $_->{'ID_language'};
$_->{'selected'} = 'true' if (grep ($_ == $cur_lang, @selected_languages));
$_; } @languages;
$person->{'has_language_skill'} = \@selection_list;
}
return $result;
}
3 Einträge, 1 Seite |