You are here

public static function OaTeams_SelectionHandler::getInstance in Open Atrium Core 7.2

Implements EntityReferenceHandler::getInstance().

Overrides EntityReference_SelectionHandler::getInstance

File

modules/oa_teams/plugins/entityreference_selection/OaTeams_SelectionHandler.class.php, line 17
Contains the OaTeams_SelectionHandler class.

Class

OaTeams_SelectionHandler
An EntityReference selection plugin for Open Atrium Teams.

Code

public static function getInstance($field, $instance = NULL, $entity_type = NULL, $entity = NULL) {
  if ($field['settings']['target_type'] !== 'node') {
    return EntityReference_SelectionHandler_Broken::getInstance($field, $instance);
  }
  return new OaTeams_SelectionHandler();
}