class ThemeSettings

Same name in this branch
  1. 9 core/modules/system/src/Plugin/migrate/destination/d7/ThemeSettings.php \Drupal\system\Plugin\migrate\destination\d7\ThemeSettings
  2. 9 core/lib/Drupal/Core/Theme/ThemeSettings.php \Drupal\Core\Theme\ThemeSettings
Same name and namespace in other branches
  1. 11.x core/modules/system/src/Plugin/migrate/destination/d7/ThemeSettings.php \Drupal\system\Plugin\migrate\destination\d7\ThemeSettings
  2. 11.x core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php \Drupal\system\Plugin\migrate\source\d7\ThemeSettings
  3. 11.x core/lib/Drupal/Core/Theme/ThemeSettings.php \Drupal\Core\Theme\ThemeSettings

Drupal 7 theme settings source from database.

For available configuration keys, refer to the parent classes.

Plugin annotation


@MigrateSource(
  id = "d7_theme_settings",
  source_module = "system"
)

Hierarchy

Expanded class hierarchy of ThemeSettings

See also

\Drupal\migrate_drupal\Plugin\migrate\source\VariableMultiRow

\Drupal\migrate\Plugin\migrate\source\SqlBase

\Drupal\migrate\Plugin\migrate\source\SourcePluginBase

File

core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php, line 21

Namespace

Drupal\system\Plugin\migrate\source\d7
View source
class ThemeSettings extends VariableMultiRow {
  
  /**
   * {@inheritdoc}
   */
  public function query() {
    return $this->select('variable', 'v')
      ->fields('v', [
      'name',
      'value',
    ])
      ->condition('name', 'theme_%_settings', 'LIKE');
  }
  
  /**
   * {@inheritdoc}
   */
  public function fields() {
    return [
      'name' => $this->t('Theme settings variable for a theme.'),
      'value' => $this->t('The theme settings variable value.'),
    ];
  }
  
  /**
   * {@inheritdoc}
   */
  public function getIds() {
    $ids['name']['type'] = 'string';
    return $ids;
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.