You are here

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

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

Namesort descending Modifiers Type Description Overrides
MigrateExtrasFlagHandler::fields public function Make the flags assigned to this object visible.
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
MigrateHandler::__construct abstract public function 11