$engine
$engine :
Base class for the Views.
All user's view must derive this class
__construct(\class $engine, \myMVC_HttpSession $session)
Constructor.
This function does nothing! This class will not be used, but just derived (see myMVC_BaseAction and myMVC_BaseView)
\class | $engine | The engine as subclass of myMVC_BaseEngine |
\myMVC_HttpSession | $session | The current session |
errorMessagesAsArray( $params, $engine) : array
Template-function to return all error messages as numeric array of associative arrays ('field' => <field name>, 'message' => <error message>)
$params | ||
$engine | The engine (typically myMVC_SmartyEngine) |
All error messages as numeric array of associative arrays
isCalledFromMenu( $params, $engine) : boolean
Template-function to return whether the action, who called this view, was called from a menu or directly from another action/view
$params | ||
$engine | The engine (typically myMVC_SmartyEngine) |
true if the field passed the validation, false otherwise
getLoggedUser() : \myMVC_BaseLogin
Returns the current logged user, if any.
This function has to be static, then it will normally called from static functions (eg hasUserRightForAction).
The currently logged user, or NULL if no user is logged in, or the user's class is not a subclass of myMVC_BaseLogin
saveParameterForNextPage(string $key, string $value)
Save a variable in the session, to be used by the next page (Action or view).
This variable can be read with the method getParameterFromPreviousPage of the classes BaseAction or BaseView
string | $key | The name of the variable |
string | $value | The value |
isParameterFromPreviousSubmitValid(string $field) : boolean
Returns whether the given parameter of the previous submitted form passed the validation or not.
string | $field | The name of the parameter |
true if the parameter passed the validation, false otherwise