protected function addTermOptions($dom, $elem)
    {
        if (!empty($this->termOptions)) {
            foreach ($this->termOptions as $opt) {
                $termElem = $dom->createElement('term-option');
                $termElem->nodeValue = $opt;
                $elem->appendChild($termElem);
            }
        }
        return $elem;
    }
protected function addTermOptions($dom, $elem)
    {
        if (!empty($this->termOptions)) {
            foreach ($this->termOptions as $opt) {
                $termElem = $dom->createElement('term-option');
                $termElem->nodeValue = $opt;
                $elem->appendChild($termElem);
            }
        }
        return $elem;
    }
protected function addTermOptions ( $ dom , $ elem ) { if ( ! empty ( $ this -> termOptions ) ) { foreach ( $ this -> termOptions as $ opt ) { $ termElem = $ dom -> createElement ( 'term-option' ) ; $ termElem -> nodeValue = $ opt ; $ elem -> appendChild ( $ termElem ) ; } } return $ elem ; }
Add term options to an element.

@param DOMDocument $dom A DOM document.
@param DOMElement $elem A DOM element.
@return DOMElement The updated element.
Add term options to an element .