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)
 {
     if ($type !== LoaderInterface::EXT_TABLES) {
         return [];
     }
     SmartObjectManager::checkAndCreateTcaInformation();
     // no preparations, because the smart objects fill the register
     return [];
 }
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::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.º 3
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;
 }
Ejemplo n.º 4
0
 /**
  * Add the smart object SQL string the the signal below
  *
  * @signalClass \TYPO3\CMS\Extensionmanager\Utility\InstallUtility
  * @signalName tablesDefinitionIsBeingBuilt
  *
  * @param array  $sqlString
  * @param string $extensionKey
  *
  * @return array
  */
 public function updateSmartObjectTables(array $sqlString, $extensionKey)
 {
     $sqlString[] = SmartObjectManager::getSmartObjectRegisterSql();
     return ['sqlString' => $sqlString, 'extensionKey' => $extensionKey];
 }