ActionHandler/News.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/ActionHandlerConfig.php';
00027 require_once dirname(__FILE__) . '/../Model/News.php';
00028 require_once dirname(__FILE__) . '/actions.php';
00029 
00030 // }}}
00031 // {{{ class FF_ActionHandlerConfig_News
00032 
00044 // }}}
00045 class FF_ActionHandlerConfig_News extends FF_ActionHandlerConfig {
00046     // {{{ loadConfig()
00047 
00054     function loadConfig()
00055     {
00056         $appName = $this->actionHandler->o_registry->getCurrentApp();
00057         $o_output =& FF_Output::factory();
00058         if ($this->actionHandler->getActionId() == ACTION_WORKSHOP_DISPLAY) {
00059             $o_output->o_tpl->assign('I_title', $o_output->imgTag(
00060                         't_workshops.gif', 'title', array('app' => $appName)));
00061         }
00062         else {
00063             $o_output->o_tpl->assign('I_title', $o_output->imgTag(
00064                         't_news.gif', 'title', array('app' => $appName)));
00065         }
00066 
00067         $this->actionHandler->setDefaultActionId(ACTION_DISPLAY);
00068         $this->actionHandler->batchModifyActions(
00069             array(ACTION_LIST, ACTION_EDIT, ACTION_ADD, ACTION_EDIT_SUBMIT, ACTION_ADD_SUBMIT, ACTION_DISPLAY, ACTION_DELETE),
00070             $this->actionHandler->o_registry->getAppFile('Action', $appName, 'libs'), 
00071             '_News',
00072             'News'
00073         );
00074         $this->actionHandler->addAction(
00075             ACTION_CONTACT, 
00076             $this->actionHandler->o_registry->getAppFile('Action/Contact.php', $appName, 'libs'), 
00077             'FF_Action_AlumContact'
00078         );
00079         $this->actionHandler->addAction(
00080             ACTION_CONTACT_SUBMIT, 
00081             $this->actionHandler->o_registry->getAppFile('Action/ContactSubmit.php', $appName, 'libs'), 
00082             'FF_Action_AlumContactSubmit'
00083         );
00084         $this->actionHandler->addAction(
00085             ACTION_WORKSHOP_DISPLAY, 
00086             $this->actionHandler->o_registry->getAppFile('Action/WorkshopDisplay.php', $appName, 'libs'), 
00087             'FF_Action_Display_Workshop'
00088         );
00089         $this->actionHandler->o_model =& new FF_Model_News();
00090     }
00091 
00092     // }}}
00093     // {{{ hasCheckAuth
00094 
00101     function hasCheckAuth() 
00102     {
00103         return true;
00104     }
00105 
00106     // }}}
00107     // {{{ checkAuth()
00108 
00116     function checkAuth() 
00117     {
00118         if ($this->actionHandler->getActionId() != ACTION_DISPLAY &&
00119             $this->actionHandler->getActionId() != ACTION_WORKSHOP_DISPLAY) {
00120             $this->actionHandler->checkAuth(true);
00121         }
00122     }
00123 
00124     // }}}
00125 }
00126 ?>

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