本文整理汇总了PHP中Wizard::getMarkup方法的典型用法代码示例。如果您正苦于以下问题:PHP Wizard::getMarkup方法的具体用法?PHP Wizard::getMarkup怎么用?PHP Wizard::getMarkup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wizard
的用法示例。
在下文中一共展示了Wizard::getMarkup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMarkup
/**
* Returns a block of XHTML-valid code that contains markup for this specific
* component.
* @param string $fieldName The field name to use when outputting form data or
* similar parameters/information.
* @access public
* @return string
*/
function getMarkup($fieldName)
{
$fromParent = parent::getMarkup($fieldName);
// make sure that we add the form info to the markup
$harmoni = Harmoni::instance();
$urlObj = $harmoni->request->mkURL();
$url = $urlObj->write();
$formName = $this->getWizardFormName();
$pre = "<form action='{$url}' method='post' name='{$formName}' id='{$formName}' enctype='multipart/form-data'>\n";
$post = "\n</form>\n";
// The removal of this confirmation on submission was added to
// Wizard.abstract.php
if (isset($this->confirmLeaving) && $this->confirmLeaving) {
if (isset($this->confirmLeavingMessage) && $this->confirmLeavingMessage) {
$string = $this->confirmLeavingMessage;
} else {
$string = dgettext("polyphony", "You in a wizard. Any unsubmitted changes will be lost.");
}
$post .= "\n<script type='text/javascript'>\n// <![CDATA[ \n\t\t\n\t\twindow.addUnloadConfirmationForElement(\"{$formName}\", \"{$string}\");\n\t\t\n\t\t// Override our parent's implementation to remove unload confirmation.\n\t\tfunction submitWizard(form) {\n\t\t\twindow.removeUnloadConfirmationForElement(form.id);\n\n\t\t\tif (validateWizard(form)) \n\t\t\t\tform.submit();\n\t\t}\n\t\n// ]]>\n</script>\n";
}
// ignore the field name
return $fromParent . $pre . Wizard::parseText($this->_text, $this->getChildren(), $this->getIdString() . "_") . $post;
}