本文整理匯總了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}();
}