OpusVL::AppKit::Plugin::AppKit
version 2.18
People not developing the actual AppKit should not really need to know much about this plugin. It is used by the OpusVL::AppKit which intended to be inherited by another Catalyst App using CatalystX::AppBuilder..
OpusVL::AppKit::Plugin::AppKit - Common functions to get OpusVL::AppKit working.
Returns a list of the appkit controllers the user has access to sorted as the app config specifies. Generally used for building up the menu.
List of apps and the group data for the full blown menu
[ { 'controller' => bless( { 'appkit_method_group' => 'Leads', 'appkit_name' => 'Customers', }, 'Aquarius::Controller::Leads' ), 'actions' => [ { 'actions' => [ { 'controller' => $controller, 'actionname' => 'index', 'value' => 'PO Approvers', 'sort_index' => 1, 'actionpath' => 'accounts/auth/index' }, { 'controller' => $controller, 'actionname' => 'index', 'value' => 'Next Item', 'sort_index' => 1, 'actionpath' => 'accounts/auth/index' }, $VAR1->[4]{'controller'}{'navigation_actions'}[3], $VAR1->[4]{'controller'}{'navigation_actions'}[5], $VAR1->[4]{'controller'}{'navigation_actions'}[4] ], 'group' => 'Leads' }, { 'actions' => [ $VAR1->[4]{'controller'}{'navigation_actions'}[0], $VAR1->[4]{'controller'}{'navigation_actions'}[2], $VAR1->[4]{'controller'}{'navigation_actions'}[1] ], 'group' => 'Customers' } ] } ];
Returns a OpusVL::AppKit::Plugin::AppKit::FeatureList object that allows the querying of the features permissions that sit on top of our roles management.
Arguments: $_[0] - Self $_[1] - Optional flag to say "re-read the tree"
Used like so: if ( $c->can_access( 'controller/action/path' ) ) { # $c->user must have the correct roles. } THIS NEEDS A MASSIVE CLEAN UP ONCE WE ARE HAPPY APPKIT WORKS WELL.
A simple utility function to turn a string into a css class by removing whitespace and non word characters, then lower casing it.
This should provide a way to get predictable and legitimate css class names from data.
OpusVL - www.opusvl.com
This software is copyright (c) 2010 by OpusVL - www.opusvl.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install OpusVL::AppKit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpusVL::AppKit
CPAN shell
perl -MCPAN -e shell install OpusVL::AppKit
For more information on module installation, please visit the detailed CPAN module installation guide.