The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mojolicious::Plugin::DataTables::SSP::Params - DataTables SSP Params Helper

SYNOPSIS

    # Mojolicious
    $self->plugin('DataTables');

    # Mojolicious::Lite
    plugin 'DataTables';

    [...]

    my $dt_params = $c->datatable->ssp_params(
        [
            {
                label     => 'UID',
                db        => 'uid',
                dt        => 0,
                formatter => sub {
                    my ($value, $column) = @_;
                    return '<a href="/user/' . $value . '">' . $value . '</a>';
                }
            },
            {
                label => 'e-Mail',
                db    => 'mail',
                dt    => 1,
            },
            {
                label => 'Status',
                db    => 'status',
                dt    => 2,
            },
        ]
    ));

DESCRIPTION

Mojolicious::Plugin::DataTables::SSP::Params is a Mojolicious plugin to add DataTables SSP (Server-Side Protocol) support in your Mojolicious application.

CONTRUCTOR

Mojolicious::Plugin::DataTables::SSP::Params->new ( @options )

Create a new instance of Mojolicious::Plugin::DataTables::SSP::Params class.

Options:

label: Column label
db: Database column name
dt: DataTable column ID
formatter: Formatter sub

METHODS

Mojolicious::Plugin::DataTables::SSP::Params implements the following methods.

columns

draw

length

order

columns

timestamp

start

SEE ALSO

Mojolicious, Mojolicious::Guides, https://mojolicious.org, Mojolicious::Plugin::DataTables, Mojolicious::Plugin::DataTables::SSP::Results.

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/giterlizzi/perl-Mojolicious-Plugin-DataTables/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/giterlizzi/perl-Mojolicious-Plugin-DataTables

    git clone https://github.com/giterlizzi/perl-Mojolicious-Plugin-DataTables.git

AUTHOR

  • Giuseppe Di Terlizzi <gdt@cpan.org>

LICENSE AND COPYRIGHT

This software is copyright (c) 2020-2021 by Giuseppe Di Terlizzi.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.