You are here

class ChartsSettingsService in Charts 5.0.x

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

Charts Settings Service.

Hierarchy

Expanded class hierarchy of ChartsSettingsService

4 files declare their use of ChartsSettingsService
ChartConfigItemDefaultWidget.php in src/Plugin/Field/FieldWidget/ChartConfigItemDefaultWidget.php
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 {

  /**
   * The factory configuration.
   *
   * @var \Drupal\Core\Config\ConfigFactoryInterface
   */
  private $configFactory;

  /**
   * Construct.
   *
   * @param \Drupal\Core\Config\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