You are here

abstract class SettingsBase in Social API 3.x

Same name and namespace in other branches
  1. 8.2 src/Settings/SettingsBase.php \Drupal\social_api\Settings\SettingsBase
  2. 8 src/Settings/SettingsBase.php \Drupal\social_api\Settings\SettingsBase

Base class for implementor module settings.

@package Drupal\social_api\Settings

Hierarchy

Expanded class hierarchy of SettingsBase

File

src/Settings/SettingsBase.php, line 12

Namespace

Drupal\social_api\Settings
View source
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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SettingsBase::$config protected property The configuration object containing the data from the configuration form.
SettingsBase::factory public static function Factory method to create a new settings object. Overrides SettingsInterface::factory
SettingsBase::getConfig public function Gets the configuration object. Overrides SettingsInterface::getConfig
SettingsBase::__construct public function Creates a new settings object.