public function MigrateDestinationEntity::__toString in Migrate 6.2
Same name and namespace in other branches
- 7.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 68 - Defines base for migration destinations implemented as Drupal entities. Drupal 6 note: Yes, there is no "entity" in D6. We maintain this intermediate class to simplify keeping the D6 and D7 implementations in sync.
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;
}