You are here

SettingsBase.php in Social API 3.x

Same filename and directory in other branches
  1. 8.2 src/Settings/SettingsBase.php
  2. 8 src/Settings/SettingsBase.php

File

src/Settings/SettingsBase.php
View source
<?php

namespace Drupal\social_api\Settings;

use Drupal\Core\Config\ImmutableConfig;

/**
 * Base class for implementor module settings.
 *
 * @package Drupal\social_api\Settings
 */
abstract class SettingsBase implements SettingsInterface {

  /**
   * The configuration object containing the data from the configuration form.
   *
   * @var \Drupal\Core\Config\ImmutableConfig
   */
  protected $config;

  /**
   * Creates a new settings object.
   *
   * @param \Drupal\Core\Config\ImmutableConfig $config
   *   The configuration object associated to the settings.
   */
  public function __construct(ImmutableConfig $config) {
    $this->config = $config;
  }

  /**
   * {@inheritdoc}
   */
  public static function factory(ImmutableConfig $config) {
    return new static($config);
  }

  /**
   * {@inheritdoc}
   */
  public function getConfig() {
    return $this->config;
  }

}

Classes

Namesort descending Description
SettingsBase Base class for implementor module settings.