Zikula_Core
[ class tree: Zikula_Core ] [ index: Zikula_Core ] [ all elements ]

Source for file ModuleUtil.class.php

Documentation is available at ModuleUtil.class.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright Robert Gasch
  6.  * @link http://www.zikula.org
  7.  * @version $Id: ModuleUtil.class.php 24342 2008-06-06 12:03:14Z markwest $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @author Robert Gasch rgasch@gmail.com
  10.  * @package Zikula_Core
  11.  */
  12.  
  13. /**
  14.  * ModuleUtil
  15.  *
  16.  * @package Zikula_Core
  17.  * @subpackage ModuleUtil
  18.  */
  19. class ModuleUtil
  20. {
  21.     /**
  22.      * Generic modules select function. Only modules in the module
  23.      * table are returned which means that new/unscanned modules
  24.      * will not be returned
  25.      *
  26.      * @param where The where clause to use for the select
  27.      * @param sort  The sort to use
  28.      *
  29.      * @return The resulting module object array
  30.      */
  31.     function getModules ($where=''$sort='displayname')
  32.     {
  33.         return DBUtil::selectObjectArray ('modules'$where$sort);
  34.     }
  35.  
  36.  
  37.     /**
  38.      * Return an array of modules in the specified state, only modules in
  39.      * the module table are returned which means that new/unscanned modules
  40.      * will not be returned
  41.      *
  42.      * @param state    The module state (optional) (defaults = active state)
  43.      * @param sort  The sort to use
  44.      *
  45.      * @return The resulting module object array
  46.      */
  47.     function getModulesByState ($state=3$sort='displayname')
  48.     {
  49.         $pntables     pnDBGetTables();
  50.         $moduletable  $pntables['modules'];
  51.         $modulecolumn $pntables['modules_column'];
  52.  
  53.         $where "$modulecolumn[state] = $state";
  54.         return DBUtil::selectObjectArray ('modules'$where$sort);
  55.     }
  56.  
  57. }

Documentation generated on Fri, 18 Jul 2008 21:47:54 +0200 by phpDocumentor 1.4.1