Source for file index.view.php

Documentation is available at index.view.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @subpackage Languages
  5. @copyright  Refer to copyright.php
  6. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  7. @author Mambo Foundation Inc see README.php
  8. */ 
  9. defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' );
  10. class indexView extends View
  11. {
  12.     function render(&$renderer&$request)
  13.     {
  14.         $rows           array();
  15.         $languageDir    mamboCore::get('mosConfig_absolute_path')."/language/";
  16.         $xmlFilesInDir  mosReadDirectory($languageDir,'.xml$');
  17.         $rowid 0;               
  18.         
  19.         foreach($xmlFilesInDir as $xmlfile{
  20.             // Read the file to see if it's a valid template XML file
  21.             $parser =new mosXMLDescription($languageDir.$xmlfile);
  22.             if ($parser->getType(!= 'language'continue;
  23.             $row                new StdClass();
  24.             $row->id            $rowid;
  25.             $row->language      substr($xmlfile,0,-4);
  26.             $row->name          $parser->getName('language');
  27.             $row->creationdate  $parser->getCreationDate('language');
  28.             $row->author        $parser->getAuthor('language');
  29.             $row->copyright     $parser->getCopyright('language');
  30.             $row->authorEmail   $parser->getAuthorEmail('language');
  31.             $row->authorUrl     $parser->getAuthorUrl('language');
  32.             $row->version       $parser->getVersion('language');
  33.             $row->checked_out 0;
  34.             $row->mosname strtolowerstr_replace" ""_"$row->name ) );
  35.             $row->published (mamboCore::get('mosConfig_locale'== $row->language0;
  36.             $rows[$row;
  37.             $rowid++;
  38.             
  39.         
  40.         }
  41.         
  42.         $renderer->addvar('rows'$rows);
  43.         $renderer->addvar('content'$renderer->fetch('table.tpl.php'));
  44.         $renderer->display('form.tpl.php');
  45.     }    
  46. }
  47. ?>

Documentation generated on Mon, 05 May 2008 16:20:31 +0400 by phpDocumentor 1.4.0