protected function appendSidebar(DOMElement $wrapper) { $sidebar = parent::appendSidebar($wrapper); $fieldset = $sidebar->lastChild; $list = $this->document->createElement('ul'); $url = clone $this->url; $url->parameters()->{'debug'} = 'source'; if (isset($_GET['debug-state'])) { $url->parameters()->{'debug-state'} = $this->state; } $this->appendLink($list, __('View Source'), (string) $url, $this->show == 'source'); $url->parameters()->debug = 'output'; $this->appendLink($list, __('View Output'), (string) $url, $this->show == 'output'); $url->parameters()->debug = 'params'; $this->appendLink($list, __('View Parameters'), (string) $url, $this->show == 'params'); $url->parameters()->debug = 'frontend'; $this->appendLink($list, __('View Frontend'), (string) $url, $this->show == 'frontend'); $fieldset->appendChild($list); $fieldset = Widget::Fieldset(__('Templates')); $fieldset->addClass('templates'); $list = $this->document->createElement('ul'); $url->parameters()->debug = 'template'; $item = $this->appendLink($list, basename($this->view->templatePathname()), (string) $url, $this->show == 'template'); $this->appendUtilityLinks($item, $this->utilities); $fieldset->appendChild($list); $sidebar->appendChild($fieldset); $fieldset = Widget::Fieldset(__('Saved States')); $fieldset->addClass('states'); $this->appendStateLinks($fieldset, $this->states); $sidebar->appendChild($fieldset); return $sidebar; }
protected function appendSidebar(DOMElement $wrapper) { $sidebar = parent::appendSidebar($wrapper); $fieldset = $sidebar->lastChild; $list = $this->document->createElement('ul'); $url = clone $this->url; $url->parameters()->debug = 'source'; $url->parameters()->{'debug-state'} = $this->state; $this->appendLink($list, __('View Source'), (string) $url, $this->show == 'source'); $url->parameters()->debug = 'output'; $this->appendLink($list, __('View Output'), (string) $url, $this->show == 'output'); $url->parameters()->debug = 'params'; $this->appendLink($list, __('View Parameters'), (string) $url, $this->show == 'params'); $url->parameters()->debug = 'frontend'; $this->appendLink($list, __('View Frontend'), (string) $url, $this->show == 'frontend'); $fieldset->appendChild($list); $fieldset = Widget::Fieldset(__('Templates')); $list = $this->document->createElement('ul'); $url->parameters()->debug = 'template'; $item = $this->appendLink($list, basename($this->view->templatePathname()), (string) $url, $this->show == 'template'); $this->appendUtilityLinks($item, $this->utilities); $fieldset->appendChild($list); $sidebar->appendChild($fieldset); $fieldset = Widget::Fieldset(__('XPath Search')); $search = Widget::Input('search'); $search->setAttribute('id', 'search'); $fieldset->appendChild($search); $sidebar->appendChild($fieldset); return $sidebar; }