protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $fragment->firstChild->setAttribute('name', $component->getName()); $fragment->firstChild->setAttribute('value', $component->getValue()); $fragment->firstChild->setAttribute('valuetype', ParamType::getNameByConstant($component->getValueType())); if ($component->hasType() === true) { $fragment->firstChild->setAttribute('type', $component->hasType()); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\AbstractXhtmlRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-modalFeedback'); $fragment->firstChild->setAttribute('data-outcome-identifier', $component->getOutcomeIdentifier()); $fragment->firstChild->setAttribute('data-show-hide', ShowHide::getNameByConstant($component->getShowHide())); $fragment->firstChild->setAttribute('data-identifier', $component->getIdentifier()); if ($this->getRenderingEngine()->getFeedbackShowHidePolicy() === AbstractMarkupRenderingEngine::CONTEXT_STATIC) { $this->additionalUserClass($component->getShowHide() === ShowHide::SHOW ? 'qti-hide' : 'qti-show'); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $fragment->firstChild->setAttribute('rel', 'stylesheet'); $fragment->firstChild->setAttribute('href', $this->transformUri($component->getHref(), $base)); $fragment->firstChild->setAttribute('type', $component->getType()); if ($component->hasMedia() === true) { $fragment->firstChild->setAttribute('media', $component->getMedia()); } if ($component->hasTitle() === true) { $fragment->firstChild->setAttribute('title', $component->getTitle()); } }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-assessmentItem'); $fragment->firstChild->setAttribute('data-identifier', $component->getIdentifier()); $fragment->firstChild->setAttribute('data-title', $component->getTitle()); if ($component->hasLabel() === true) { $fragment->firstChild->setAttribute('data-label', $component->getLabel()); } if ($component->hasLang() === true) { $fragment->firstChild->setAttribute('data-lang', $component->getLang()); } $fragment->firstChild->setAttribute('data-adaptive', $component->isAdaptive() === true ? 'true' : 'false'); $fragment->firstChild->setAttribute('data-time-dependent', $component->isTimeDependent() === true ? 'true' : 'false'); }
protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-bodyElement'); $this->additionalClass('qti-' . $component->getQtiClassName()); if ($component->hasId() === true) { $fragment->firstChild->setAttribute('id', $component->getId()); } if ($component->hasClass() === true) { $fragment->firstChild->setAttribute('class', $component->getClass()); } if ($component->hasLang() === true) { $fragment->firstChild->setAttribute('lang', $component->getLang()); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\AbstractXhtmlRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-' . $component->getQtiClassName()); if ($component->hasId() === true) { $fragment->firstChild->setAttribute('id', $component->getId()); } if ($component->hasClass() === true) { $classes = explode(" ", $component->getClass()); foreach ($classes as $class) { $this->additionalUserClass($class); } } if ($component->hasLang() === true) { $fragment->firstChild->setAttribute('lang', $component->getLang()); } if ($component->getDir() !== Direction::AUTO) { $fragment->firstChild->setAttribute('dir', Direction::getNameByConstant($component->getDir())); } }
/** * @see \qtism\runtime\rendering\markup\xhtml\AbstractXhtmlRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-simpleMatchSet'); return; }
public function __construct(AbstractMarkupRenderingEngine $renderingEngine = null) { parent::__construct($renderingEngine); }
/** * @see \qtism\runtime\rendering\markup\xhtml\AbstractXhtmlRenderer::appendAttributes() */ protected function appendAttributes(DOMDocumentFragment $fragment, QtiComponent $component, $base = '') { parent::appendAttributes($fragment, $component, $base); $this->additionalClass('qti-positionObjectStage'); }