3 namespace Drupal\field\Plugin\migrate\source\d7;
5 use Drupal\migrate\Row;
6 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
9 * The field instance per form display source class.
12 * id = "d7_field_instance_per_form_display"
15 class FieldInstancePerFormDisplay extends DrupalSqlBase {
20 public function query() {
21 $query = $this->select('field_config_instance', 'fci')
32 $query->join('field_config', 'fc', 'fci.field_id = fc.id');
39 public function prepareRow(Row $row) {
40 $data = unserialize($row->getSourceProperty('data'));
41 $row->setSourceProperty('widget', $data['widget']);
42 $row->setSourceProperty('widget_settings', $data['widget']['settings']);
43 return parent::prepareRow($row);
49 public function fields() {
51 'field_name' => $this->t('The machine name of field.'),
52 'bundle' => $this->t('Content type where this field is used.'),
53 'data' => $this->t('Field configuration data.'),
54 'entity_type' => $this->t('The entity type.'),
61 public function getIds() {