You are here

public function MigrateDestinationEntity::__toString in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 plugins/destinations/entity.inc \MigrateDestinationEntity::__toString()

Derived classes must implement __toString().

Return value

string Description of the destination being migrated into

Overrides MigrateDestination::__toString

File

plugins/destinations/entity.inc, line 71
Defines base for migration destinations implemented as Drupal entities.

Class

MigrateDestinationEntity
Abstract base class for entity-based destination handling. Holds common Field API-related functions.

Code

public function __toString() {

  // TODO: Link to configuration page
  if ($this->entityType == $this->bundle) {
    $output = t('%type', array(
      '%type' => $this->entityType,
    ));
  }
  else {
    $output = t('%type (%bundle)', array(
      '%type' => $this->entityType,
      '%bundle' => $this->bundle,
    ));
  }

  // TODO: Non-default language, input format
  return $output;
}