/**
  * @return void
  */
 protected function initializeOverriddenSettings()
 {
     $row = $this->getRecord();
     $extensionKey = $this->provider->getExtensionKey($row);
     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.
         $extensionSignature = str_replace('_', '', $extensionKey);
         $this->settings = $this->configurationService->getTypoScriptSubConfiguration(NULL, 'settings', $extensionSignature);
     }
 }