PrivateMessageConfigFormBase.php in Private Message 8.2
File
src/Plugin/PrivateMessageConfigForm/PrivateMessageConfigFormBase.php
View source
<?php
namespace Drupal\private_message\Plugin\PrivateMessageConfigForm;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\PluginBase;
use Drupal\Core\Config\ConfigFactoryInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class PrivateMessageConfigFormBase extends PluginBase implements PrivateMessageConfigFormPluginInterface {
protected $configFactory;
public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $configFactory) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->configFactory = $configFactory;
}
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('config.factory'));
}
public function getName() {
return $this->pluginDefinition['name'];
}
public function getId() {
return $this->pluginDefinition['id'];
}
public function validateForm(array &$form, FormStateInterface $formState) {
}
}