[ 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/ -> adminplugintemplatedview.class.php (source)

   1  <?php
   2  
   3      lt_include( PLOG_CLASS_PATH.'class/view/admin/adminview.class.php' );
   4      lt_include( PLOG_CLASS_PATH.'class/template/templateservice.class.php' );
   5  
   6      /**
   7       * \ingroup View
   8       *    
   9       * Loads template files from the plugins/ folder
  10       */
  11      class AdminPluginTemplatedView extends AdminView 
  12      {
  13  
  14          var $_templateName;
  15          var $_pluginId;
  16  
  17          /**
  18           * This initializes the class, but normally we'll only have to initialize the parent
  19           *
  20           * @param blogInfo
  21           * @param pluginId
  22           * @param templateName
  23           */
  24          function AdminPluginTemplatedView( $blogInfo, $pluginId, $templateName )
  25          {
  26              $this->AdminView( $blogInfo );
  27  
  28              $this->_templateName = $templateName;
  29              $this->_pluginId     = $pluginId;
  30          }
  31  
  32          /**
  33           * Renders the view. It simply gets all the parameters we've been adding to it
  34           * and puts them in the context of the template renderer so that they can be accessed
  35           * as normal parameters from within the template
  36           *
  37           * @return Returns a rendered template
  38           */
  39          function render()
  40          {
  41              parent::render();
  42              
  43              // now, load the plugin's own template
  44              $template = $this->_templateService->PluginTemplate( $this->_pluginId, $this->_templateName );
  45              // assign all the values
  46              $template->assign( $this->_params->getAsArray());
  47              
  48              // and return the results
  49              print $template->fetch();
  50          }
  51      }
  52  ?>


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