abstract class MigrateExtrasFlagHandler in Migrate Extras 7.2
Field handler - this will expose flags as fields on the object they're attached to, and set the flag to the value mapped in addFieldMapping().
Hierarchy
- class \MigrateHandler
- class \MigrateDestinationHandler
- class \MigrateExtrasFlagHandler
- class \MigrateDestinationHandler
Expanded class hierarchy of MigrateExtrasFlagHandler
File
- ./
flag.inc, line 110 - Flag module integration
View source
abstract class MigrateExtrasFlagHandler extends MigrateDestinationHandler {
/**
* Make the flags assigned to this object visible.
*/
public function fields($entity_type, $bundle) {
$fields = array();
if (module_exists('flag')) {
$flags = flag_get_flags($entity_type, $bundle);
foreach ($flags as $flag_name => $flag) {
$fields[$flag_name] = $flag->title;
}
}
return $fields;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateExtrasFlagHandler:: |
public | function | Make the flags assigned to this object visible. | |
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 | |
MigrateHandler:: |
abstract public | function | 11 |