Ejemplo n.º 1
0
 /**
  * Get all the complex data for the loader.
  * This return value will be cached and stored in the database
  * There is no file monitoring for this cache
  *
  * @param Loader $loader
  * @param int    $type
  *
  * @return array
  */
 public function prepareLoader(Loader $loader, $type)
 {
     $configuration = [];
     $modelPath = ExtensionManagementUtility::extPath($loader->getExtensionKey()) . 'Classes/Domain/Model/';
     if (!is_dir($modelPath)) {
         return $configuration;
     }
     $models = FileUtility::getBaseFilesRecursivelyInDir($modelPath, 'php');
     foreach ($models as $model) {
         $className = ClassNamingUtility::getFqnByPath($loader->getVendorName(), $loader->getExtensionKey(), 'Domain/Model/' . $model);
         if (SmartObjectManager::isSmartObjectClass($className)) {
             $configuration[] = $className;
         }
     }
     // already add for the following processes
     $this->addClassesToSmartRegister($configuration);
     return $configuration;
 }
Ejemplo n.º 2
0
 /**
  * Get all the complex data for the loader.
  * This return value will be cached and stored in the database
  * There is no file monitoring for this cache
  *
  * @param Loader $loader
  * @param int    $type
  *
  * @return array
  */
 public function prepareLoader(Loader $loader, $type)
 {
     $configuration = [];
     $modelPath = ExtensionManagementUtility::extPath($loader->getExtensionKey()) . 'Classes/Domain/Model/';
     if (!is_dir($modelPath)) {
         return $configuration;
     }
     $models = FileUtility::getBaseFilesInDir($modelPath, 'php');
     foreach ($models as $model) {
         $className = $loader->getVendorName() . '\\' . ucfirst(GeneralUtility::underscoredToUpperCamelCase($loader->getExtensionKey())) . '\\Domain\\Model\\' . $model;
         if (SmartObjectManager::isSmartObjectClass($className)) {
             $configuration[] = $className;
         }
     }
     // already add for the following processes
     $this->addClassesToSmartRegister($configuration);
     return $configuration;
 }