public function guessFieldType($their_field = null)
{
return;
if (!is_string($their_field)) {
return;
}
// We shouldn't traverse into ourselves recursively
$cl = get_class($this->owner) . '::' . $this->short_name;
// see where we shouldn't traverse
if (isset($this->owner->_do_not_traverse_into)) {
$dnti = $this->owner->_do_not_traverse_into;
if (isset($dnti[$cl])) {
return;
}
}
$dnti[$cl] = true;
$m = $this->getModel(['_do_not_traverse_into' => $dnti]);
$f = $m->hasElement($their_field ?: $this->their_field);
return $f ? $f->type : null;
}