Source for file function.pnformerrormessage.php
Documentation is available at function.pnformerrormessage.php
* @copyright (c) 2006, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: function.pnformerrormessage.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Template_Plugins
* Error message placeholder
* Use this plugin to display error messages. It should be added in your template in the exact location where
* you want the error message to be displayed. Then, on postback, you can do as shown here to set the
* function handleCommand(&$render, &$args)
* if ($args['commandName'] == 'update')
* if (!$render->pnFormIsValid())
* $data = $render->pnFormGetValues();
* if (... something is wrong ...)
* $errorPlugin = $render->pnFormGetPluginById('MyPluginId');
* $errorPlugin->message = 'Something happend';
* Beware that {@link pnFormRender::pnFormGetPluginById()} only works on postback.
* Displayed error message
return __FILE__ ; // FIXME: should be found in smarty's data???
$html = "<div class=\"$cssClass\">" . $this->message . "</div>\n";
return $render->pnFormRegisterPlugin('pnFormErrorMessage', $params);
|