Attribute.php in Commerce Migrate 8.2
File
modules/ubercart/src/Plugin/migrate/source/Attribute.php
View source
<?php
namespace Drupal\commerce_migrate_ubercart\Plugin\migrate\source;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
class Attribute extends DrupalSqlBase {
public function query() {
return $this
->select('uc_attributes', 'uca')
->fields('uca');
}
public function fields() {
return [
'aid' => $this
->t('Attribute id'),
'name' => $this
->t('Name'),
'label' => $this
->t('Label'),
'ordering' => $this
->t('Attribute display order'),
'required' => $this
->t('Attribute field required'),
'display' => $this
->t('Display type'),
'description' => $this
->t('Attribute description'),
];
}
public function getIds() {
return [
'aid' => [
'type' => 'integer',
],
];
}
}
Classes
Name |
Description |
Attribute |
Provides migration source for attributes. |