You are here

class MigrateMediaFieldHandler in Migrate Extras 7.2

Hierarchy

Expanded class hierarchy of MigrateMediaFieldHandler

1 string reference to 'MigrateMediaFieldHandler'
migrate_extras_migrate_api in ./migrate_extras.migrate.inc

File

./media.inc, line 143

View source
class MigrateMediaFieldHandler extends MigrateFileFieldHandler {
  public function __construct() {
    $this
      ->registerTypes(array(
      'media',
    ));
  }

  /**
   * Implementation of MigrateFieldHandler::fields().
   *
   * @param $type
   *  The field type.
   * @param $instance
   *  Instance info for the field.
   * @param Migration $migration
   *  The migration context for the parent field. We can look at the mappings
   *  and determine which subfields are relevant.
   * @return array
   */
  public function fields($type, $instance, $migration = NULL) {
    $fields = parent::fields($type, $instance, $migration);
    unset($fields['description']);
    unset($fields['display']);
    $fields += array(
      'title' => t('Subfield: String to be used as the title value'),
      'data' => t('Subfield: Additional data about the field'),
    );
    return $fields;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateFieldHandler::getFieldLanguage function Determine the language of the field.
MigrateFileFieldBaseHandler::destinationDir protected function Determine where the migrated file should go.
MigrateFileFieldBaseHandler::prepare public function Implementation of MigrateFieldHandler::prepare().
MigrateFileFieldHandler::buildFieldArray protected function Implementation of MigrateFileFieldBaseHandler::buildFieldArray(). Overrides MigrateFileFieldBaseHandler::buildFieldArray
MigrateHandler::$dependencies protected property List of other handler classes which should be invoked before the current one.
MigrateHandler::$typesHandled protected property List of "types" handled by this handler. Depending on the kind of handler, these may be destination types, field types, etc.
MigrateHandler::getDependencies public function
MigrateHandler::getTypesHandled public function
MigrateHandler::handlesType public function Does this handler handle the given type? 1
MigrateHandler::registerTypes protected function Register a list of types handled by this class
MigrateMediaFieldHandler::fields public function Implementation of MigrateFieldHandler::fields(). Overrides MigrateFileFieldHandler::fields
MigrateMediaFieldHandler::__construct public function Overrides MigrateFileFieldHandler::__construct