Beispiel #1
0
 public function __get($var)
 {
     if ($var == 'url') {
         $row = $this->_getLinkRow();
         if (!$row || !$row->mail) {
             return '';
         }
         return self::createHref($row);
     } else {
         if ($var == 'url_mail_html') {
             $row = $this->_getLinkRow();
             if (!$row || !$row->mail) {
                 return '';
             }
             return self::createHref($row, false);
         } else {
             if ($var == 'url_mail_txt') {
                 $row = $this->_getLinkRow();
                 return !$row || !$row->mail ? '' : $row->mail;
             } else {
                 if ($var == 'rel') {
                     return '';
                 } else {
                     return parent::__get($var);
                 }
             }
         }
     }
 }
 public function __get($var)
 {
     if ($var == 'url' || $var == 'rel') {
         return $this->getChildComponent('_video')->{$var};
     } else {
         return parent::__get($var);
     }
 }
 public function __get($var)
 {
     if ($var == 'url') {
         $anchor = $this->getComponent()->getRow()->anchor;
         if ($anchor) {
             return '#' . $anchor;
         }
         return '';
     } else {
         if ($var == 'rel') {
             return '';
         } else {
             return parent::__get($var);
         }
     }
 }
Beispiel #4
0
 public function __get($var)
 {
     if ($var == 'url') {
         if (!$this->_getLinkData()->getComponent()->hasContent()) {
             return '';
         }
         return $this->_getLinkData()->url;
     } else {
         if ($var == 'rel') {
             if (!$this->_getLinkData()->getComponent()->hasContent()) {
                 return '';
             }
             return $this->_getLinkData()->rel;
         } else {
             return parent::__get($var);
         }
     }
 }
Beispiel #5
0
 public function __get($var)
 {
     if ($var == 'url') {
         if (!$this->getLinkedData()) {
             return '';
         }
         $ret = $this->getLinkedData()->url;
         if ($this->_anchor) {
             $ret .= '#' . $this->_anchor;
         }
         return $ret;
     } else {
         if ($var == 'rel') {
             if (!$this->getLinkedData()) {
                 return '';
             }
             return $this->getLinkedData()->rel;
         } else {
             return parent::__get($var);
         }
     }
 }
 public function getLinkDataAttributes()
 {
     $ret = parent::getLinkDataAttributes();
     if (!Kwc_Abstract::getSetting($this->componentClass, 'hasPopup')) {
         $type = Kwc_Abstract::getSetting($this->componentClass, 'openType');
         if ($type == 'blank') {
             $ret['kwc-popup'] = 'blank';
         } else {
             throw new Kwf_Exception_NotYetImplemented();
         }
     }
     $row = $this->_getLinkRow();
     if (!isset($row->open_type) || !$row->open_type) {
         return '';
     }
     if ($row->open_type == 'popup') {
         $pop = array();
         if ($row->width) {
             $pop[] = 'width=' . $row->width;
         }
         if ($row->height) {
             $pop[] = 'height=' . $row->height;
         }
         $pop[] = 'menubar=' . ($row->menubar ? 'yes' : 'no');
         $pop[] = 'toolbar=' . ($row->toolbar ? 'yes' : 'no');
         $pop[] = 'location=' . ($row->locationbar ? 'yes' : 'no');
         $pop[] = 'status=' . ($row->statusbar ? 'yes' : 'no');
         $pop[] = 'scrollbars=' . ($row->scrollbars ? 'yes' : 'no');
         $pop[] = 'resizable=' . ($row->resizable ? 'yes' : 'no');
         $ret['kwc-popup'] = implode(',', $pop);
     } else {
         if ($row->open_type == 'blank') {
             $ret['kwc-popup'] = 'blank';
         }
     }
     return $ret;
 }