[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/view/admin/ -> admintemplatedview.class.php (source)

   1  <?php
   2  
   3      lt_include( PLOG_CLASS_PATH."class/view/admin/adminview.class.php" );
   4  
   5  
   6      /**
   7       * \ingroup View
   8       * @private
   9       *    
  10       * Generic view to be used by those classes that do not really need a customized view...
  11       * which is almost all of them. This one simply loads a template from disk. The name of the template
  12       * must be the parameter from disk.
  13       */
  14      class AdminTemplatedView extends AdminView 
  15      {
  16  
  17          var $_templateName;
  18  
  19          /**
  20           * This initializes the class, but normally we'll only have to initialize the parent
  21           */
  22          function AdminTemplatedView( $blogInfo, $templateName )
  23          {
  24              $this->AdminView( $blogInfo );
  25  
  26              $this->_templateName = $templateName;
  27          }
  28  
  29          /**
  30           * Renders the view. It simply gets all the parameters we've been adding to it
  31           * and puts them in the context of the template renderer so that they can be accessed
  32           * as normal parameters from within the template
  33           */
  34          function render()
  35          {
  36              parent::render();
  37          
  38              $template = $this->_templateService->AdminTemplate( $this->_templateName, $this->_blogInfo );
  39              // assign all the values
  40              $template->assign( $this->_params->getAsArray());           
  41  
  42              // and send the results after asking plugins if they need to process anything
  43              $output = $template->fetch();
  44              $this->notifyEvent( EVENT_PROCESS_BLOG_ADMIN_TEMPLATE_OUTPUT, Array( 'content' => &$output, 'template' => $this->_templateName ));
  45  
  46              print( $output );
  47          }
  48      }
  49  ?>


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics