Show
Ignore:
Timestamp:
11/25/07 21:34:08 (5 years ago)
Author:
d0nut
Message:

released version 0.1 of donation plugin

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • donation/optionals/de.easy-coding.wcf.donation.googlecheckout/files/lib/system/event/listener/DonationAddFormGoogleCheckoutListener.class.php

    r108 r109  
    11<?php 
    2 // WCF includes 
    3 require_once(WCF_DIR.'lib/system/event/EventListener.class.php'); 
     2require_once(WCF_DIR.'lib/system/event/listener/DonationAddFormAbstractListener.class.php'); 
    43 
    54/** 
    6  * Adds google checkout information for donation 
     5 * googlecheckout 
    76 * 
    87 * @author      Torben Brodt 
     
    109 * @license     GNU General Public License <http://opensource.org/licenses/gpl-3.0.html> 
    1110 */ 
    12 class DonationAddFormGoogleCheckoutListener implements EventListener { 
     11class DonationAddFormGoogleCheckoutListener extends DonationAddFormAbstractListener { 
     12        protected $icon = 'googlecheckout48.png'; 
     13        protected $templateName = 'donationGoogleCheckout'; 
    1314        protected $system = 'googlecheckout'; 
    14         protected $prefix = 'donation_googlecheckout_'; 
    15         protected $eventObj; 
    1615         
    1716        //data 
    18         protected $amount, $message; 
    19  
    20         /** 
    21          * @see EventListener::execute() 
    22          */ 
    23         public function execute($eventObj, $className, $eventName) { 
    24                 $this->eventObj = $eventObj; 
    25                  
    26                 if($this->eventObj->system != '' && $this->eventObj->system != $this->system) { 
    27                         return; 
    28                 } 
    29  
    30                 switch($eventName) { 
    31                         case 'assignVariables': 
    32                                 $this->assignVariables(); 
    33                         break; 
    34                 } 
    35         } 
    36          
    37         /** 
    38          * @see Page::assignVariables() 
    39          */ 
    40         protected function assignVariables() { 
    41                 switch($this->eventObj->step) { 
    42                         case 0: 
    43                                 WCF::getTPL()->assign(array( 
    44                                         'donation_system' => $this->system, 
    45                                         'donation_icon' => RELATIVE_WCF_DIR.'icon/googlecheckout96.png', 
    46                                         'donation_title' => WCF::getLanguage()->get('wcf.donation.category.donation.plugins.googlecheckout'), 
    47                                         'donation_description' => WCF::getLanguage()->get('wcf.donation.category.donation.plugins.googlecheckout.description') 
    48                                 )); 
    49  
    50                                 WCF::getTPL()->append('additionalDonationSystems', WCF::getTPL()->fetch('donation_container')); 
    51                         break; 
    52                         case 1: 
    53                                 WCF::getTPL()->append('donationSystemContainer', WCF::getTPL()->fetch('donationGoogleCheckout')); 
    54                         break; 
    55                 } 
    56         } 
     17        protected $arr = array('googlecheckout_enable','googlecheckout_code'); 
    5718} 
    5819?>