本文整理汇总了PHP中HTMLPage::__build方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLPage::__build方法的具体用法?PHP HTMLPage::__build怎么用?PHP HTMLPage::__build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLPage
的用法示例。
在下文中一共展示了HTMLPage::__build方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __build
protected function __build($version = VERSION, XMLElement $extra = null)
{
parent::__build();
$this->Form = Widget::Form(INSTALL_URL . '/index.php', 'post');
$title = new XMLElement('h1', $this->_page_title);
$version = new XMLElement('em', __('Version %s', array($version)));
$title->appendChild($version);
if (!is_null($extra)) {
$title->appendChild($extra);
}
$this->Form->appendChild($title);
if (isset($this->_params['show-languages']) && $this->_params['show-languages']) {
$languages = new XMLElement('ul');
foreach (Lang::getAvailableLanguages(false) as $code => $lang) {
$languages->appendChild(new XMLElement('li', Widget::Anchor($lang, '?lang=' . $code), $_REQUEST['lang'] == $code || $_REQUEST['lang'] == null && $code == 'en' ? array('class' => 'selected') : array()));
}
$languages->appendChild(new XMLElement('li', Widget::Anchor(__('Symphony is also available in other languages'), 'http://getsymphony.com/download/extensions/translations/'), array('class' => 'more')));
$this->Form->appendChild($languages);
}
$this->Body->appendChild($this->Form);
$function = 'view' . str_replace('-', '', ucfirst($this->_template));
$this->{$function}();
}