ContactSettings.php in Drupal 8
File
core/modules/contact/src/Plugin/migrate/source/ContactSettings.php
View source
<?php
namespace Drupal\contact\Plugin\migrate\source;
use Drupal\migrate_drupal\Plugin\migrate\source\Variable;
class ContactSettings extends Variable {
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,
],
]);
}
}
Classes
Name |
Description |
ContactSettings |
Plugin annotation
@MigrateSource(
id = "contact_settings",
source_module = "contact"
) |