예제 #1
0
 /**
  * Test getModules
  */
 public function testGetModules()
 {
     $configuration = new Phprojekt_Configuration();
     $data = array(array('name' => 'General', 'label' => Phprojekt::getInstance()->translate('General')));
     $this->assertEquals($data, $configuration->getModules());
 }
 /**
  * Returns all the modules that contain Configuration.php file.
  *
  * Returns a list of modules that have a Configuration class, with:
  * <pre>
  *  - name  => Name of the module.
  *  - label => Display for the module.
  * </pre>
  *
  * The return is in JSON format.
  *
  * @return void
  */
 public function jsonGetModulesAction()
 {
     $configuration = new Phprojekt_Configuration();
     $data = $configuration->getModules();
     Phprojekt_Converter_Json::echoConvert($data);
 }