class ContactSettings
Same name and namespace in other branches
- 11.x core/modules/contact/src/Plugin/migrate/source/ContactSettings.php \Drupal\contact\Plugin\migrate\source\ContactSettings
- 10 core/modules/contact/src/Plugin/migrate/source/ContactSettings.php \Drupal\contact\Plugin\migrate\source\ContactSettings
- 8.9.x core/modules/contact/src/Plugin/migrate/source/ContactSettings.php \Drupal\contact\Plugin\migrate\source\ContactSettings
Drupal 6/7 contact settings source from database.
For available configuration keys, refer to the parent classes.
Plugin annotation
@MigrateSource(
id = "contact_settings",
source_module = "contact"
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait extends \Drupal\Component\Plugin\PluginBase
- class \Drupal\migrate\Plugin\migrate\source\SourcePluginBase implements \Drupal\migrate\Plugin\MigrateSourceInterface, \Drupal\migrate\Event\RollbackAwareInterface extends \Drupal\Core\Plugin\PluginBase
- class \Drupal\migrate\Plugin\migrate\source\SqlBase implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\migrate\Plugin\RequirementsInterface extends \Drupal\migrate\Plugin\migrate\source\SourcePluginBase
- class \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase implements \Drupal\Component\Plugin\DependentPluginInterface uses \Drupal\Core\Entity\DependencyTrait extends \Drupal\migrate\Plugin\migrate\source\SqlBase
- class \Drupal\migrate_drupal\Plugin\migrate\source\Variable extends \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
- class \Drupal\contact\Plugin\migrate\source\ContactSettings extends \Drupal\migrate_drupal\Plugin\migrate\source\Variable
- class \Drupal\migrate_drupal\Plugin\migrate\source\Variable extends \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
- class \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase implements \Drupal\Component\Plugin\DependentPluginInterface uses \Drupal\Core\Entity\DependencyTrait extends \Drupal\migrate\Plugin\migrate\source\SqlBase
- class \Drupal\migrate\Plugin\migrate\source\SqlBase implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\migrate\Plugin\RequirementsInterface extends \Drupal\migrate\Plugin\migrate\source\SourcePluginBase
- class \Drupal\migrate\Plugin\migrate\source\SourcePluginBase implements \Drupal\migrate\Plugin\MigrateSourceInterface, \Drupal\migrate\Event\RollbackAwareInterface extends \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait extends \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of ContactSettings
See also
\Drupal\migrate\Plugin\migrate\source\SqlBase
\Drupal\migrate\Plugin\migrate\source\SourcePluginBase
File
-
core/
modules/ contact/ src/ Plugin/ migrate/ source/ ContactSettings.php, line 20
Namespace
Drupal\contact\Plugin\migrate\sourceView source
class ContactSettings extends Variable {
/**
* {@inheritdoc}
*/
protected function initializeIterator() {
$default_category = $this->select('contact', 'c')
->fields('c', [
'cid',
])
->condition('c.selected', 1)
->execute()
->fetchField();
return new \ArrayIterator([
$this->values() + [
'default_category' => $default_category,
],
]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.