本文整理汇总了PHP中Editor::SetTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP Editor::SetTemplate方法的具体用法?PHP Editor::SetTemplate怎么用?PHP Editor::SetTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Editor
的用法示例。
在下文中一共展示了Editor::SetTemplate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<tr> <th class="h2" colspan="2">Connection Parameters</th> </tr>
<tr> <th class="right">{$prompt_dbhost}:</th> <td class="left">##dbhost.input.20##</td> </tr>
<tr> <th class="right">{$prompt_dbport}:</th> <td class="left">##dbport.input.5##</td> </tr>
<tr> <th class="right">{$prompt_dbname}:</th> <td class="left">##dbname.input.20##</td> </tr>
<tr> <th class="right">{$prompt_dbuser}:</th> <td class="left">##dbuser.input.20##</td> </tr>
<tr> <th class="right">{$prompt_dbpass}:</th> <td class="left">##dbpass.password.20##</td> </tr>
<tr> <th class="h2" colspan="2">Operation Parameters</th> </tr>
<tr> <th class="right">{$prompt_app_user}:</th> <td class="left">##app_user.input.20##</td> </tr>
<tr> <th class="right">{$prompt_do_patch}:</th> <td class="left">##apply_patches.checkbox##</td> </tr>
<tr> <th class="right">{$prompt_owner}:</th> <td class="left">##owner.input.20##</td> </tr>
<tr> <th class="right"></th> <td class="left" colspan="2">##submit##</td> </tr>
</table>
</form>
EOTEMPLATE;
$editor->SetTemplate($template);
$page_elements[] = $editor;
$c->stylesheets[] = 'css/edit.css';
include "page-header.php";
/**
* Page elements could be an array of viewers, browsers or something else
* that supports the Render() method... or a non-object which we assume is
* just a string of text that we echo.
*/
$heading_level = null;
foreach ($page_elements as $k => $page_element) {
if (is_object($page_element)) {
echo $page_element->Render($heading_level);
$heading_level = 'h2';
} else {
echo $page_element;