Ejemplo n.º 1
0
 /**
  * @param $extjsParams
  * @return array
  *
  * todo: renaming
  */
 public function getGeneralSettingsApprovedExtensions($extjsParams)
 {
     // Todo: check logic
     $extjsParams = array();
     $extensionArray = array();
     // Get Configuration Object
     $this->getConfigurationObject($extjsParams);
     // Get System Translation Object
     $this->getSystemTranslationObject();
     // Init System Translation Object
     $this->systemTranslationObj->init($this->confObj);
     // Get All Available Extensions
     $extensions = $this->systemTranslationObj->getDirectories();
     // Get Approved Extensions
     $approvedExtensions = $this->confObj->getApplicationConfiguration('ApprovedExtensions');
     // Prepare For Output
     if (is_array($extensions) && count($extensions) > 0) {
         foreach ($extensions as $extension) {
             // Do Not Add Extension If Already Approved
             if (!in_array($extension, $approvedExtensions)) {
                 array_push($extensionArray, array('ExtensionKey' => $extension));
             }
         }
     }
     return $extensionArray;
 }
Ejemplo n.º 2
0
 /**
  * @return void
  */
 private function initSystemTranslations()
 {
     if (!is_object($this->systemTranslation) && !$this->systemTranslation instanceof Translations) {
         $this->systemTranslation = GeneralUtility::makeInstance('Snowflake\\Snowbabel\\Service\\Translations');
         $this->systemTranslation->init($this->confObj);
     }
 }