protected function convertADTDefinitionToMulti(ilADTDefinition $a_adt_def) { if ($a_adt_def->getType() == "Enum") { $this->multi_source = false; $def = ilADTFactory::getInstance()->getDefinitionInstanceByType("MultiEnum"); $def->setNumeric($a_adt_def->isNumeric()); $def->setOptions($a_adt_def->getOptions()); return $def; } else { $this->multi_source = true; return $a_adt_def; } }
/** * Get search bridge instance for ADT definition * * @param ilADTDefinition $a_adt_def * @param bool $a_range * @param bool $a_multi * @return ilADTSearchBridge */ public function getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, $a_range = true, $a_multi = true) { if ($a_range) { try { $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeRange"); return new $class($a_adt_def); } catch (Exception $e) { } } // multi enum search (single) == enum search (multi) if (!$a_multi && $a_adt_def->getType() == "MultiEnum") { $class = $this->initTypeClass("Enum", "SearchBridgeMulti"); return new $class($a_adt_def); } if ($a_multi) { try { $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeMulti"); return new $class($a_adt_def); } catch (Exception $e) { } } $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeSingle"); return new $class($a_adt_def); }
public function reset() { parent::reset(); $this->options = array(); $this->setNumeric(true); }
public function reset() { parent::reset(); $this->elements = array(); }