public function MigrateImageFieldHandler::fields in Migrate 7.2
Implementation of MigrateFieldHandler::fields(). Note that file and image fields support slightly different field lists.
Parameters
$type: The file field type - 'file' or 'image'
$instance: Instance info for the field.
Migration $migration: The migration context for the parent field. We can look at the mappings and determine which subfields are relevant.
Return value
array
Overrides MigrateFileFieldBaseHandler::fields
File
- plugins/
destinations/ fields.inc, line 885 - Support for processing entity fields
Class
- MigrateImageFieldHandler
- Handle for image fields;
Code
public function fields($type, $instance, $migration = NULL) {
$fields = parent::fields($type, $instance, $migration);
$fields += array(
'alt' => t('Subfield: <a href="@doc">String to be used as the alt value</a>', array(
'@doc' => 'http://drupal.org/node/1224042#alt',
)),
'title' => t('Subfield: <a href="@doc">String to be used as the title value</a>', array(
'@doc' => 'http://drupal.org/node/1224042#title',
)),
);
return $fields;
}