protected function parseField(\DOMXPath $xpath, \DOMElement $element) { $description = ''; $type = $element->getAttribute('type'); $implementor = $this->resolveImplementor($type); if ($description_element = $xpath->query('./description', $element)->item(0)) { $description = $this->parseDescription($xpath, $xpath->query('./description', $element)->item(0)); } return Schema\FieldDefinition::create(array('name' => $element->getAttribute('name'), 'short_name' => $implementor == $type ? null : $type, 'implementor' => $implementor, 'description' => $description, 'options' => $this->parseOptions($xpath, $element))); }