PortalBlockDisplay.php

Go to the documentation of this file.
00001 <?php
00003 // {{{ license
00004 
00005 // +----------------------------------------------------------------------+
00006 // | FastFrame Application Framework                                      |
00007 // +----------------------------------------------------------------------+
00008 // | Copyright (c) 2002-2006 The Codejanitor Group                        |
00009 // +----------------------------------------------------------------------+
00010 // | This source file is subject to the GNU Lesser Public License (LGPL), |
00011 // | that is bundled with this package in the file LICENSE, and is        |
00012 // | available at through the world-wide-web at                           |
00013 // | http://www.fsf.org/copyleft/lesser.html                              |
00014 // | If you did not receive a copy of the LGPL and are unable to          |
00015 // | obtain it through the world-wide-web, you can get it by writing the  |
00016 // | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
00017 // | MA 02111-1307, USA.                                                  |
00018 // +----------------------------------------------------------------------+
00019 // | Authors: Jason Rust <jrust@codejanitor.com>                          |
00020 // | Authors: Greg Gilbert <ggilbert@codejanitor.com>                     |
00021 // +----------------------------------------------------------------------+
00022 
00023 // }}}
00024 // {{{ requires
00025 
00026 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action/Display.php';
00027 
00028 // }}}
00029 // {{{ class FF_Action_Display_PortalBlock 
00030 
00041 // }}}
00042 class FF_Action_Display_PortalBlock extends FF_Action_Display {
00043     // {{{ renderSearchBox()
00044 
00051     function renderSearchBox()
00052     {
00053         return;
00054     }
00055 
00056     // }}}
00057     // {{{ renderDisplay()
00058 
00065     function renderDisplay()
00066     {
00067         $this->o_output->o_tpl->append('content_middle', $this->getBlockData());
00068         $this->renderAdditionalLinks();
00069     }
00070 
00071     // }}}
00072     // {{{ getBlockData()
00073 
00080     function getBlockData()
00081     {
00082         $o_widget =& new FF_Smarty('twoColumnTable');
00083         $o_widget->assign(array('S_table_columns' => 1,
00084                 'T_table_header' => $this->getPageName(), 'has_table_header' => true));
00085         require_once 'HTML/BBCodeParser.php';
00086         $o_bbCodeParser =& new HTML_BBCodeParser(array('filters' => 'Basic,Email,Links,Lists'));
00087         $s_content = $this->o_model->getContent(true);
00088         if ($this->o_model->getNl2Br()) {
00089             $s_content = nl2br($s_content);
00090         }
00091 
00092         $o_widget->append('rows', array('has_content_cell' => true, 
00093                         'T_table_content_cell' => $o_bbCodeParser->qparse($s_content)));
00094         return $o_widget->fetch();
00095     }
00096     
00097     // }}}
00098     // {{{ renderAdditionalLinks()
00099 
00106     function renderAdditionalLinks()
00107     {
00108         if (($s_actionId = FF_Request::getParam('returnActionId', 'g', false))) {
00109         $this->o_output->o_tpl->append('page_links', $this->o_output->link(FastFrame::selfURL(
00110                         array('actionId' => $s_actionId, 'module' => 'PortalBlock')),
00111                     _('Return to Portal Block List')));
00112         }
00113         else {
00114             $this->o_output->o_tpl->append('page_links', $this->o_output->link(
00115                         'javascript: window.history.go(-1)', _('Return')));
00116         }
00117     }
00118 
00119     // }}}
00120     // {{{ getPageName()
00121 
00128     function getPageName()
00129     {
00130         return $this->o_model->getName();
00131     }
00132 
00133     // }}}
00134 }
00135 ?>

Generated on Fri Jun 23 11:38:17 2006 for FastFrame by  doxygen 1.4.4