CatalystX::Usul::TraitFor::Controller::ModelHelper - Convenience methods for common model calls
Describes v0.17.$Rev: 1 $
package YourApp::Controller::YourController; use CatalystX::Usul::Moose; extends q(CatalystX::Usul::Controller); with q(CatalystX::Usul::TraitFor::Controller::ModelHelper);
Many convenience methods for common model calls
$self->check_field_wrapper( $c );
Creates an XML response to and Ajax call which validates a data value for a given form field. Calls "check_field_wrapper" in CatalystX::Usul::TraitFor::Controller::ModelHelper
$bool = $self->close_footer( $c );
Forces the footer to not be displayed when the page is rendered
$bool = $self->close_sidebar( $c );
Forces the sidebar to not be displayed when the page is rendered
$self->default( $c );
Generates a simple page not found page. No longer called as unknown pages cause a redirect to the controllers default page
$bool = $self->open_footer( $c );
Sets the key/value pair in the browser state cookie that will cause the footer to appear in the generated page
$bool = $self->open_sidebar( $c );
Sets the key/value pair in the browser state cookie that will cause the sidebar to appear in the generated page
$nav_model_obj = $self->reset_nav_menu( $c, $key, \%params );
Calls add_header and clear_controls on the stashed nav_model. Optionally calls an add_menu_* method on the stashed nav_model if $key is one of; back, blank, or close. Returns the stashed nav_model object
nav_model
add_menu_*
$key
close
$panel_number = $self->select_sidebar_panel( $c, $panel_number );
Set the cookie that controls which sidebar panel is visible
$help_model = $self->set_popup( $c, $key, \%params );
Sets the popup flag to stop the browser from caching the window size in the browser state cookie. Clears the main navigation menu and adds a $key window link. Calls "reset_nav_menu". Returns the help model object
$self->stash_identity_model( $c );
Stashes currently selected realm name. Determines and stashes the current user and roles models based on the current realm
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
<Support at RoxSoft.co.uk>
Copyright (c) 2014 Pete Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install CatalystX::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::Usul
CPAN shell
perl -MCPAN -e shell install CatalystX::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.