Zikula_System_Modules
[ class tree: Zikula_System_Modules ] [ index: Zikula_System_Modules ] [ all elements ]

Source for file text.php

Documentation is available at text.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  * @copyright (c) 2001, Zikula Development Team
  5.  * @link http://www.zikula.org
  6.  * @version $Id: text.php 24342 2008-06-06 12:03:14Z markwest $
  7.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  8.  * @package Zikula_System_Modules
  9.  * @subpackage Blocks
  10.  */
  11.  
  12. /**
  13.  * initialise block
  14.  *
  15.  * @author       The Zikula Development Team
  16.  */
  17. {
  18.     // Security
  19.     pnSecAddSchema('Textblock::''Block title::');
  20. }
  21.  
  22. /**
  23.  * get information on block
  24.  *
  25.  * @author       The Zikula Development Team
  26.  * @return       array       The block information
  27.  */
  28. {
  29.     return array('text_type'      => 'Text',
  30.                  'module'         => 'Blocks',
  31.                  'text_type_long' => 'Plain Text',
  32.                  'allow_multiple' => true,
  33.                  'form_content'   => true,
  34.                  'form_refresh'   => false,
  35.                  'show_preview'   => true);
  36.  
  37. }
  38.  
  39. /**
  40.  * display block
  41.  *
  42.  * @author       The Zikula Development Team
  43.  * @param        array       $blockinfo     a blockinfo structure
  44.  * @return       output      the rendered bock
  45.  */
  46. function Blocks_textblock_display($blockinfo)
  47. {
  48.     if (!SecurityUtil::checkPermission('Textblock::'"$blockinfo[title]::"ACCESS_OVERVIEW)) {
  49.         return;
  50.     }
  51.  
  52.      // itevo: /Go; line breaks aren't displayed; added a nl2br() to fix this
  53.     $blockinfo['content'nl2br($blockinfo['content']);
  54.     // /itevo
  55.  
  56.     return pnBlockThemeBlock($blockinfo);
  57. }

Documentation generated on Fri, 18 Jul 2008 21:58:23 +0200 by phpDocumentor 1.4.1