protected function loadDatatype($name)
{
if (!empty($this->datatypes[$name])) {
return $this->datatypes[$name];
}
$class = 'Datatypes\\' . $name . '\\Datatype';
$object = new $class();
$object->setRequest($this->getRequest());
$object->setHelperManager($this->getHelperManager());
$object->setRouter($this->getRouter());
$object->load($this->getDatatype()->getDatatypeModel(), $this->getProperty()->getDocumentId());
$this->datatypes[$name] = $object;
return $this->datatypes[$name];
}