You are here

class ChartsSettingsService in Charts 8.3

Same name and namespace in other branches
  1. 8.4 src/Services/ChartsSettingsService.php \Drupal\charts\Services\ChartsSettingsService
  2. 5.0.x src/Services/ChartsSettingsService.php \Drupal\charts\Services\ChartsSettingsService

Charts Settings Service.

Hierarchy

Expanded class hierarchy of ChartsSettingsService

3 files declare their use of ChartsSettingsService
ChartsBlock.php in modules/charts_blocks/src/Plugin/Block/ChartsBlock.php
ChartsPluginStyleChart.php in src/Plugin/views/style/ChartsPluginStyleChart.php
ChartsSettingsServiceTest.php in tests/src/Unit/Services/ChartsSettingsServiceTest.php
1 string reference to 'ChartsSettingsService'
charts.services.yml in ./charts.services.yml
charts.services.yml
1 service uses ChartsSettingsService
charts.settings in ./charts.services.yml
Drupal\charts\Services\ChartsSettingsService

File

src/Services/ChartsSettingsService.php, line 10

Namespace

Drupal\charts\Services
View source
class ChartsSettingsService implements ChartsSettingsServiceInterface {
  private $configFactory;

  /**
   * Construct.
   *
   * @param ConfigFactoryInterface $config_factory
   *   Config factory.
   */
  public function __construct(ConfigFactoryInterface $config_factory) {
    $this->configFactory = $config_factory;
  }

  /**
   * {@inheritdoc}
   */
  public function getChartsSettings() {
    $config = $this->configFactory
      ->getEditable('charts.settings');
    return $config
      ->get('charts_default_settings');
  }

}

Members