public function doWidget() { $oListTag = new TagWriter('div'); $oListTag->addToParameter('class', 'ui-tree'); $oListTag->setParameter('data-widget-session', $this->sPersistentSessionKey); $oListTag->setParameter('data-widget-type', $this->getModuleName()); return $oListTag->parse(); }
public function doWidget() { $oElement = $this->getElementType(); if ($oElement === null) { return null; } if (!$oElement instanceof TagWriter) { $oElement = new TagWriter($oElement); } $oElement->setParameter('data-widget-type', $this->getModuleName()); $oElement->setParameter('data-widget-session', $this->sPersistentSessionKey); if ($this->sInputName !== null) { $oElement->setParameter('name', $this->sInputName); } return $oElement->parse(); }
public static function imageCallbackBe($oIdentifier) { $iDocumentId = $oIdentifier->getValue(); $oDocument = DocumentQuery::create()->findPk($iDocumentId); if ($oDocument !== null && $oDocument->isImage()) { $oWriter = new TagWriter('img', $oIdentifier->getParameters()); $oWriter->setParameter('src', self::link($oDocument->getDisplayUrl())); $oWriter->setParameter('alt', $oDocument->getDescription()); $oWriter->setParameter('title', $oDocument->getDescription()); return $oWriter->parse(); } }