15ec9b9415a7e54e340bdce84b743065d85c98bb
[yaffs-website] / web / core / modules / field / src / Plugin / migrate / source / d6 / FieldInstanceOptionTranslation.php
1 <?php
2
3 namespace Drupal\field\Plugin\migrate\source\d6;
4
5 /**
6  * Gets field instance option label translations.
7  *
8  * @MigrateSource(
9  *   id = "d6_field_instance_option_translation",
10  *   source_module = "i18ncck"
11  * )
12  */
13 class FieldInstanceOptionTranslation extends FieldOptionTranslation {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function query() {
19     $query = parent::query();
20     $query->join('content_node_field_instance', 'cnfi', 'cnf.field_name = cnfi.field_name');
21     $query->addField('cnfi', 'type_name');
22     return $query;
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   public function fields() {
29     $fields = [
30       'type_name' => $this->t('Type (article, page, ....)'),
31     ];
32     return parent::fields() + $fields;
33   }
34
35 }