public function LineItem::getFieldValues in Commerce Migrate 3.0.x
Same name and namespace in other branches
- 8.2 modules/commerce/src/Plugin/migrate/source/commerce1/LineItem.php \Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1\LineItem::getFieldValues()
- 3.1.x modules/commerce/src/Plugin/migrate/source/commerce1/LineItem.php \Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1\LineItem::getFieldValues()
Retrieves field values for a single field of a single entity.
Parameters
string $entity_type: The entity type.
string $field: The field name.
int $entity_id: The entity ID.
int|null $revision_id: (optional) The entity revision ID.
string $language: (optional) The field language.
Return value
array The raw field values, keyed and sorted by delta.
Overrides FieldableEntity::getFieldValues
1 call to LineItem::getFieldValues()
- LineItem::prepareRow in modules/
commerce/ src/ Plugin/ migrate/ source/ commerce1/ LineItem.php - Adds additional data to the row.
File
- modules/
commerce/ src/ Plugin/ migrate/ source/ commerce1/ LineItem.php, line 119
Class
- LineItem
- Gets Commerce 1 commerce_line_items from source database.
Namespace
Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1Code
public function getFieldValues($entity_type, $field, $entity_id, $revision_id = NULL, $language = NULL) {
$values = parent::getFieldValues($entity_type, $field, $entity_id, $revision_id, $language);
// Unserialize any data blob in these fields.
foreach ($values as $key => &$value) {
if (isset($value['data'])) {
$values[$key]['data'] = unserialize($value['data']);
}
}
return $values;
}