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}(); }