Mojolicious-Plugin-DevexpressHelpers

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/DevexpressHelpers.pm  view on Meta::CPAN

package Mojolicious::Plugin::DevexpressHelpers;
$Mojolicious::Plugin::DevexpressHelpers::VERSION = '0.163572';
#ABSTRACT: Add some helpers to add and configure Devexpress controls
use Modern::Perl;
use Mojo::Base 'Mojolicious::Plugin';
use Mojolicious::Plugin::DevexpressHelpers::Helpers;
use MojoX::AlmostJSON;




sub register {
    my ( $self, $app, $args ) = @_;

    $args->{'tag_camelcase'} //= 1;
    $args->{'tag_prefix'}    //= 'dx';
    Mojolicious::Plugin::DevexpressHelpers::Helpers->register( $app, $args );

    #make json boolean easier to write within templates
    $app->helper( 'true'  => \&MojoX::AlmostJSON::true );
    $app->helper( 'false' => \&MojoX::AlmostJSON::false );

    $app->hook(
        before_dispatch => sub {
            my $c = shift;

            #create a new object that will help to generate binding for dx controls
            $c->stash( 'dxHelper' =>
                    Mojolicious::Plugin::DevexpressHelpers::Helpers->new );
        }
    );

}


1; # End of Mojolicious::Plugin::DevexpressHelpers

__END__

=pod

=encoding UTF-8

=head1 NAME

Mojolicious::Plugin::DevexpressHelpers - Add some helpers to add and configure Devexpress controls

=head1 VERSION

version 0.163572

=head1 SYNOPSIS

Add some helpers to add and configure Devexpress controls in templates.

    plugin 'DevexpressHelpers' => {
            dx_path => 'c:/Program Files (x86)/DevExpress 14.2/DevExtreme/Sources/Lib',
            dx_theme  => 'light',
        };
        
    ...
    %= dxbutton 'My button' => '/my/action'

=head1 NAME



( run in 2.106 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )