You are here

class MigrateExtrasUserFlagHandler in Migrate Extras 7.2

Hierarchy

Expanded class hierarchy of MigrateExtrasUserFlagHandler

1 string reference to 'MigrateExtrasUserFlagHandler'
migrate_extras_migrate_api in ./migrate_extras.migrate.inc

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

Namesort descending Modifiers Type Description Overrides
MigrateExtrasFlagHandler::fields public function Make the flags assigned to this object visible.
MigrateExtrasUserFlagHandler::complete public function
MigrateExtrasUserFlagHandler::__construct public function Overrides MigrateHandler::__construct
MigrateHandler::$dependencies protected property List of other handler classes which should be invoked before the current one.
MigrateHandler::$typesHandled protected property List of "types" handled by this handler. Depending on the kind of handler, these may be destination types, field types, etc.
MigrateHandler::getDependencies public function
MigrateHandler::getTypesHandled public function
MigrateHandler::handlesType public function Does this handler handle the given type? 1
MigrateHandler::registerTypes protected function Register a list of types handled by this class