public function ProfileBilling::query in Commerce Migrate 3.1.x
Same name and namespace in other branches
- 8.2 modules/ubercart/src/Plugin/migrate/source/ProfileBilling.php \Drupal\commerce_migrate_ubercart\Plugin\migrate\source\ProfileBilling::query()
- 3.0.x modules/ubercart/src/Plugin/migrate/source/ProfileBilling.php \Drupal\commerce_migrate_ubercart\Plugin\migrate\source\ProfileBilling::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- modules/
ubercart/ src/ Plugin/ migrate/ source/ ProfileBilling.php, line 31
Class
- ProfileBilling
- Ubercart billing profile source.
Namespace
Drupal\commerce_migrate_ubercart\Plugin\migrate\sourceCode
public function query() {
// Gets every order sorted by created date so the revisioning of the
// billing profile is in the correct order.
$query = $this
->select('uc_orders', 'uo')
->fields('uo')
->orderBy('uo.created');
$query
->leftJoin('uc_countries', 'uc', static::JOIN_COUNTRY);
$query
->addField('uc', 'country_iso_code_2');
$query
->leftJoin('uc_zones', 'uz', static::JOIN_ZONE);
$query
->addField('uz', 'zone_code');
return $query;
}