Source for file block.pnsecauthaction_block.php
Documentation is available at block.pnsecauthaction_block.php
* Zikula Application Framework
* @copyright (c) 2004, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: block.pnsecauthaction_block.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Template_Plugins
* Smarty block to implement PN permissions checks in a template
* - realm the realm under test
* - component the component under test
* - instance the instance under test
* - level the level of access required
* <!--[pnsecauthaction_block component='News::' instance='1::' level=ACCESS_COMMENT]-->
* do some stuff now we have permission
* <!--[/pnsecauthaction_block]-->
* @param array $params All attributes passed to this function from the template
* @param string $content The content between the block tags
* @param object $smarty Reference to the Smarty object
* @return mixed the content if permission is held, null if no permissions is held (or on the opening tag), false on an error
if (!isset ($realm)) $realm = 0;
if (!isset ($component)) {
$smarty->trigger_error('pnsecauthaction_block: attribute component required');
$smarty->trigger_error('pnsecauthaction_block: attribute instance required');
$smarty->trigger_error('pnsecauthaction_block: attribute level required');
|