Show
Ignore:
Timestamp:
11/25/07 21:34:08 (6 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.phone/files/lib/system/event/listener/DonationAddFormPhoneListener.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 phone form for donation 
     5 * phone 
    76 * 
    87 * @author      Torben Brodt 
     
    109 * @license     GNU General Public License <http://opensource.org/licenses/gpl-3.0.html> 
    1110 */ 
    12 class DonationAddFormPhoneListener implements EventListener { 
     11class DonationAddFormPhoneListener extends DonationAddFormAbstractListener { 
     12        protected $icon = 'donation_phone.png'; 
     13        protected $templateName = 'donationPhone'; 
    1314        protected $system = 'phone'; 
    14         protected $prefix = 'donation_phone_'; 
    15         protected $eventObj; 
    16  
    17         /** 
    18          * @see EventListener::execute() 
    19          */ 
    20         public function execute($eventObj, $className, $eventName) { 
    21                 $this->eventObj = $eventObj; 
    22                  
    23                 if($this->eventObj->system != '' && $this->eventObj->system != $this->system) { 
    24                         return; 
    25                 } 
    26  
    27                 switch($eventName) { 
    28                         case 'assignVariables': 
    29                                 $this->assignVariables(); 
    30                         break; 
    31                 } 
    32         } 
    33  
    34         /** 
    35          * @see Page::assignVariables() 
    36          */ 
    37         protected function assignVariables() { 
    38                 switch($this->eventObj->step) { 
    39                         case 1: 
    40                                 WCF::getTPL()->assign(array( 
    41                                         'donation_system' => $this->system, 
    42                                         'donation_icon' => RELATIVE_WCF_DIR.'icon/donation_phone.png','', 
    43                                         'donation_title' => WCF::getLanguage()->get('wcf.donation.category.donation.plugins.phone'), 
    44                                         'donation_description' => WCF::getLanguage()->get('wcf.donation.category.donation.plugins.phone.description') 
    45                                 )); 
    46  
    47                                 WCF::getTPL()->append('additionalDonationSystems', WCF::getTPL()->fetch('donation_container')); 
    48                         break; 
    49                 } 
    50         } 
     15         
     16        //data 
     17        protected $arr = array('phone_enable'); 
    5118} 
    5219?>