+=head1 SYNOPSIS
+
+ # short sugared syntax:
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Description'),
+ call => [ 'kivi.Javascript.function', @arguments ],
+ accesskey => 'enter',
+ disabled => $tooltip_with_reason_or_falsish,
+ only_if => $precomputed_condition,
+ not_if => $precomputed_condition,
+ id => 'html-element-id',
+ ],
+ combobox => [
+ action => [...],
+ action => [...],
+ action => [...],
+ action => [...],
+ ],
+ link => [
+ t8('Description'),
+ link => $url,
+ ],
+ 'separator',
+ );
+ }
+
+ # full syntax without sugar
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ (SL::Layout::ActionBar::Action->new(
+ text => t8('Description'),
+ params => {
+ call => [ 'kivi.Javascript.function', @arguments ],
+ accesskey => 'enter',
+ disabled => $tooltip_with_reason_or_falsish,
+ },
+ )) x(!!$only_id && !$not_if),
+ SL::Layout::ActionBar::ComboBox->new(
+ actions => [
+ SL::Layout::ActionBar::Action->new(...),
+ SL::Layout::ActionBar::Action->new(...),
+ SL::Layout::ActionBar::Action->new(...),
+ SL::Layout::ActionBar::Action->new(...),
+ ],
+ ),
+ SL::Layout::ActionBar::Link->new(
+ text => t8('Description'),
+ params => {
+ link => $url,
+ },
+ ),
+ SL::Layout::ActionBar::Separator->new,
+ );
+ }
+