[ Pobierz całość w formacie PDF ]
.Note that theparent class will have set up $this->optionurl and $this->optionline to help inthe construction of links within the component and a hidden variable to identify thecomponent respectively.public function view ($rows){$mainhtml = $this->listview($rows);echo T_('Byline')}{$this->T_('Hits')}{$this->T_('Published')}[ 301 ]Real ContentADMIN_HEADER;$i = $k = 0;foreach ($rows as $i=>$row){if ($showlinks) $title = titleLINK_TITLE;else $title = $row->title;$html.= id$title$row->byline$row->hits{$this->html('publishedProcessing', $row, $i )}END_OF_BODY_HTML;$i++;$k = 1 - $k;}if (0 == $rowcount) $html.= T_('Byline')}{$this->T_('Version')}[ 303 ]Real Content{$this->T_('Article text')}{$editor->editorAreaText( 'article', $text->article,'article', 500, 200, 80, 15 )}{$this->T_('Publishing')}{$this->T_('Published')}checkedIfTrue($text->published)} />{$this->T_('Start date')}{$this->T_('End date')}{$this->T_('Metadata')}{$this->T_('Keys')}$text->metakey{$this->T_('Description')}$text->metadesc$this->optionline[ 304 ]Chapter 14EDIT_HTML;}Finally, there is a common method to deal with the creation of the heading.It usesthe addCSS method provided by the parent class to link to a small amount of CSSthat is held in a separate file.Although the list of text items defined in the XHTMLabove is perfectly legitimate as a table, since it really is a tabular structure, theheading would be better built out of other XHTML elements.The only reason forusing a table here is that it is one of the features retained from earlier systems for the sake of backwards compatibility:private function header ($subhead=''){$this->addCSS(_ALIRO_ADMIN_DIR.'/components/com_text/admin.text.css');if ($subhead) $subhead = "[$subhead]";return
[ Pobierz całość w formacie PDF ]