getSettingsForExtensionName() public method

Accepts any input extension name type.
public getSettingsForExtensionName ( string $extensionName ) : array
$extensionName string
return array
Example #1
0
 /**
  * @return void
  */
 protected function initializeOverriddenSettings()
 {
     $row = $this->getRecord();
     $extensionKey = $this->provider->getExtensionKey($row);
     $extensionKey = ExtensionNamingUtility::getExtensionKey($extensionKey);
     if (TRUE === isset($this->data['settings']) && TRUE === is_array($this->data['settings'])) {
         // a "settings." array is defined in the flexform configuration - extract it, use as "settings" in template
         // as well as the internal $this->settings array as per expected Extbase behavior.
         $this->settings = RecursiveArrayUtility::merge($this->settings, $this->data['settings']);
     }
     if (TRUE === isset($this->settings['useTypoScript']) && TRUE === (bool) $this->settings['useTypoScript']) {
         // an override shared by all Flux enabled controllers: setting plugin.tx_EXTKEY.settings.useTypoScript = 1
         // will read the "settings" array from that location instead - thus excluding variables from the flexform
         // which are still available as $this->data but no longer available automatically in the template.
         $this->settings = $this->configurationService->getSettingsForExtensionName($extensionKey);
     }
 }
Example #2
0
 /**
  * @param array $row
  * @return array
  */
 protected function getViewVariables(array $row)
 {
     $extensionKey = $this->getExtensionKey($row);
     $fieldName = $this->getFieldName($row);
     $variables = array('record' => $row, 'settings' => $this->configurationService->getSettingsForExtensionName($extensionKey));
     // Special case: when saving a new record variable $row[$fieldName] is already an array
     // and must not be processed by the configuration service. This has limited support from
     // Flux (essentially: no Form instance which means no inheritance, transformation or
     // form options can be dependended upon at this stage).
     $lang = $this->getCurrentLanguageName();
     $value = $this->getCurrentValuePointerName();
     if (FALSE === is_array($row[$fieldName])) {
         $recordVariables = $this->configurationService->convertFlexFormContentToArray($row[$fieldName], NULL, $lang, $value);
         $variables = RecursiveArrayUtility::mergeRecursiveOverrule($variables, $recordVariables);
     }
     $variables = RecursiveArrayUtility::mergeRecursiveOverrule($this->templateVariables, $variables);
     return $variables;
 }