File modules/cms/action/link/LinkShowAction.class.php
Last commit: Sat Mar 19 00:09:47 2022 +0100 dankert Refactoring: Outputs are setting their content-type themself.
1 <?php 2 namespace cms\action\link; 3 use cms\action\LinkAction; 4 use cms\action\Method; 5 use cms\model\BaseObject; 6 use util\Html; 7 8 9 class LinkShowAction extends LinkAction implements Method { 10 11 public function view() { 12 $this->setContentType('text/html' ); 13 14 15 echo '<html><body>'; 16 echo '<h1>'.$this->link->filename.'</h1>'; 17 echo '<hr />'; 18 19 try { 20 $o = new BaseObject( $this->link->linkedObjectId ); 21 $o->load(); 22 echo '<a href="'.Html::url($o->getType(),'show',$o->objectid).'">'.$o->filename.'</a>'; 23 } 24 catch( \util\exception\ObjectNotFoundException $e ) { 25 echo '-'; 26 } 27 28 echo '</body></html>'; 29 30 exit; 31 } 32 33 public function post() { 34 } 35 }
Downloadmodules/cms/action/link/LinkShowAction.class.php
History Sat, 19 Mar 2022 00:09:47 +0100 dankert Refactoring: Outputs are setting their content-type themself. Sun, 13 Feb 2022 23:35:26 +0100 dankert Refactoring: New class "Response" which stores all output information. Sun, 5 Dec 2021 20:33:24 +0100 dankert Cleanup: Removed unusable properties from class 'Value' and 'BaseObject'. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.