class MigrateExtrasUserFlagHandler in Migrate Extras 7.2
Hierarchy
- class \MigrateHandler
- class \MigrateDestinationHandler
- class \MigrateExtrasFlagHandler
- class \MigrateExtrasUserFlagHandler
- class \MigrateExtrasFlagHandler
- class \MigrateDestinationHandler
Expanded class hierarchy of MigrateExtrasUserFlagHandler
1 string reference to 'MigrateExtrasUserFlagHandler'
File
- ./
flag.inc, line 148 - Flag module integration
View source
class MigrateExtrasUserFlagHandler extends MigrateExtrasFlagHandler {
public function __construct() {
$this
->registerTypes(array(
'user',
));
}
public function complete($user, stdClass $row) {
if (!module_exists('flag')) {
return;
}
$flags = flag_get_flags('user', 'user');
$fields = array();
foreach ($flags as $flag_name => $flag) {
if (!empty($user->{$flag_name})) {
flag('flag', $flag_name, $user->uid);
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateExtrasFlagHandler:: |
public | function | Make the flags assigned to this object visible. | |
MigrateExtrasUserFlagHandler:: |
public | function | ||
MigrateExtrasUserFlagHandler:: |
public | function |
Overrides MigrateHandler:: |
|
MigrateHandler:: |
protected | property | List of other handler classes which should be invoked before the current one. | |
MigrateHandler:: |
protected | property | List of "types" handled by this handler. Depending on the kind of handler, these may be destination types, field types, etc. | |
MigrateHandler:: |
public | function | ||
MigrateHandler:: |
public | function | ||
MigrateHandler:: |
public | function | Does this handler handle the given type? | 1 |
MigrateHandler:: |
protected | function | Register a list of types handled by this class |