protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-inlineInteraction'); $this->additionalClass('qti-textEntryInteraction'); $fragment->firstChild->setAttribute('type', 'text'); }
protected function appendChildren(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendChildren($fragment, $component, $base); // Append a textarea... $textarea = $fragment->ownerDocument->createElement('textarea'); // Makes the textarea non self-closing... $textarea->appendChild($fragment->ownerDocument->createTextNode('')); $fragment->firstChild->appendChild($textarea); }