public function possibleTemplates()
 {
     $aResult = array();
     foreach (ResourceFinder::findResourceObjectsByExpressions(array(DIRNAME_MODULES, AdminModule::getType(), AdminModule::getNameByClassName('DashboardAdminModule'), DIRNAME_TEMPLATES, 'layouts', '/^[\\w_\\d-]+\\.tmpl$/')) as $oResource) {
         $aResult[] = $oResource->getFileName('.tmpl');
     }
     return $aResult;
 }
 public function getDisplayOptions()
 {
     $aResult = array();
     foreach (ResourceFinder::findResourceObjectsByExpressions(array(DIRNAME_MODULES, FrontendModule::getType(), FrontendModule::getNameByClassName('LoginFrontendModule'), DIRNAME_TEMPLATES, '/^[\\w_\\d-]+\\.tmpl$/')) as $oResource) {
         $sFileName = $oResource->getFileName('.tmpl');
         if (strpos($sFileName, '_action_') !== false) {
             continue;
         }
         $aResult[$sFileName] = StringUtil::makeReadableName($sFileName);
     }
     return $aResult;
 }
Example #3
0
 public static function listModuleTypes()
 {
     if (self::$MODULE_TYPE_LIST === null) {
         $aPaths = ResourceFinder::findResourceObjectsByExpressions(array(DIRNAME_MODULES, ResourceFinder::ANY_NAME_OR_TYPE_PATTERN));
         self::$MODULE_TYPE_LIST = array();
         foreach ($aPaths as $oPath) {
             self::$MODULE_TYPE_LIST[] = $oPath->getFileName();
         }
     }
     return self::$MODULE_TYPE_LIST;
 }
Example #4
0
 /**
  * Delete temp files only used while running generate-model
  */
 private static function deleteUnusedFiles()
 {
     if (file_exists(MAIN_DIR . '/' . DIRNAME_GENERATED . '/buildtime-conf.xml')) {
         unlink(MAIN_DIR . '/' . DIRNAME_GENERATED . '/buildtime-conf.xml');
     }
     // Unlink *.schema.sql files
     $aSchemas = ResourceFinder::findResourceObjectsByExpressions(array(DIRNAME_GENERATED, self::SCHEMA_FILE_PATTERN), ResourceFinder::SEARCH_MAIN_ONLY);
     foreach ($aSchemas as $oSchema) {
         $oSchema->unlink();
     }
     // Unlink copied build.properties
     unlink(MAIN_DIR . '/' . DIRNAME_GENERATED . '/build.properties');
     // Unlink copied propel additions (behaviours)
     $aAdditions = ResourceFinder::findResourceObjectsByExpressions(array(DIRNAME_GENERATED, 'propel_additions', '/^[\\w_]+\\.php$/'), ResourceFinder::SEARCH_MAIN_ONLY);
     foreach ($aAdditions as $oAddition) {
         $oAddition->unlink();
     }
 }