示例#1
0
 /**
  * @return Modules
  */
 public function findInstalledModules()
 {
     $list = array();
     $modules = Mage::app()->getConfig()->getNode('modules')->asArray();
     foreach ($modules as $moduleName => $moduleInfo) {
         $codePool = isset($moduleInfo['codePool']) ? $moduleInfo['codePool'] : '';
         $version = isset($moduleInfo['version']) ? $moduleInfo['version'] : '';
         $active = isset($moduleInfo['active']) ? $moduleInfo['active'] : '';
         $list[] = array('codePool' => trim($codePool), 'Name' => trim($moduleName), 'Version' => trim($version), 'Status' => StringTyped::formatActive($active));
     }
     return new Modules($list);
 }
 /**
  * @param string $value
  * @return string
  */
 protected function formatActive($value)
 {
     return StringTyped::formatActive($value);
 }
示例#3
0
 /**
  * @test
  */
 public function scope()
 {
     $this->assertSame(true, StringTyped::parseBoolOption("true"));
     $this->assertSame('inactive', StringTyped::formatActive(null));
     $this->assertSame('active', StringTyped::formatActive('1'));
 }