openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

LinkEditAction.class.php (839B)


      1 <?php
      2 namespace cms\action\link;
      3 use cms\action\Action;
      4 use cms\action\LinkAction;
      5 use cms\action\Method;
      6 use cms\model\BaseObject;
      7 use language\Messages;
      8 
      9 
     10 class LinkEditAction extends LinkAction implements Method {
     11     public function view() {
     12 
     13 		$this->setTemplateVars( $this->link->getProperties() );
     14 
     15 		// Typ der Verknuepfung
     16 		$this->setTemplateVar('type'            ,$this->link->getType()     );
     17 
     18 		if   ( $this->link->linkedObjectId ) {
     19 
     20 			$target = new BaseObject( $this->link->linkedObjectId );
     21 			$target->load();
     22 
     23 			$this->setTemplateVar('target'  ,$target->getProperties() );
     24 			$this->setTemplateVar('targetobjectid'  ,$target->objectid  );
     25 			$this->setTemplateVar('targetobjectname',$target->getName() );
     26 			$this->setTemplateVar('targetobjecttype',$target->getType() );
     27 		}
     28     }
     29 
     30     public function post() {
     31     }
     32 }