Skip to content

En dev listing callbacks

semuel edited this page Jan 4, 2012 · 2 revisions

Listing Framework CALLBACKS

list_template_param.object

The list_template_param callback will be called just before building the list template, similar to template_param for the common template.

Synopsis

sub list_template_param_foo {
    my $cb = shift;
    my ( $app, $param, $tmpl ) = @_;
    # Do something
}

Attributes

$app
An instance of the MT::App.
$param
A hash reference of parameters that is passed to build the template.
$tmpl
MT::Template object to build the template.

Return Value

This callback does not require a return value.

cms_pre_load_filtered_list.object

The cms_pre_load_filtered_list callback will be called just before loading the object when the list is requested.

Synopsis

sub cms_pre_load_filtered_list_foo {
    my $cb = shift;
    my ( $app, $filter, $options, $cols ) = @_;
    # Do something
}

Attributes

$app
An instance of the MT::App class.
$filter
An instance of the MT::Filter class.
$options
A hash reference of the current filter that includes $terms.
$cols
An array reference of the list of requested columns.

Return Value

This callback does not require a return value.

cms_filtered_list_param.object

The cms_filtered_list_param callback will be called just before rendering the generated list.

Synopsis

sub cms_filtered_list_param_foo {
    my $cb = shift;
    my ( $app, $res, $objs ) = @_;
    # Do something
}

Attributes

$app
An instance of the MT::App class.
$res
An array reference of the matched objects that were modified for rendering.
$objs
An array reference of the matched objects.

Return Value

This callback does not require a return value.

Clone this wiki locally