public function MigrateDestinationUserRelationships::__construct in Migrate Extras 7.2
Same name and namespace in other branches
- 6.2 user_relationships.inc \MigrateDestinationUserRelationships::__construct()
Construct a destination for the specified user relationship type. Interprets the type as a type name - if that fails, assumes it's a type ID (rtid).
Parameters
mixed $type_name: Name of a user relationship type, or its rtid.
Overrides MigrateDestination::__construct
File
- ./
user_relationships.inc, line 22 - Import User Relationships.
Class
- MigrateDestinationUserRelationships
- Destination class implementing migration into user_relationships table.
Code
public function __construct($type_name) {
parent::__construct();
$type = user_relationships_type_load(array(
'name' => $type_name,
));
if ($type) {
$this->typeName = $type_name;
$this->typeID = $type->rtid;
}
else {
$type = user_relationships_type_load($type_name);
$this->typeName = $type->name;
$this->typeID = $type_name;
}
}