Deutschland United States United Kingdom
ContentLion - Open Source CMS

Blame tabber.php

Rev 3 | Go to most recent revision | Details | Last modification | View Log

Rev Author Line
2 user_9
<?php
user_9
 
user_9
class Plugin_Tabber_Tabber {
user_9
 
user_9
    protected $tabs = array();
user_9
    protected $customStyle = null;
user_9
 
user_9
    public function __construct () {
user_9
        //
user_9
    }
user_9
 
user_9
    public function addCustomStyleClass ($class = "tabberlive") {
user_9
        $this->customStyle = $class;
user_9
    }                  
user_9
 
user_9
    public function addTab (Plugin_Tabber_Tab $tab) {
user_9
        $this->tabs[] = $tab;
user_9
    }
user_9
 
user_9
    public function getCode () {
user_9
        if ($this->customStyle == null) {
user_9
            $code = "<div class=\"tabber\">";
user_9
        } else {
user_9
            $code = "<div class=\"" . $this->customerStyle . "\">";
user_9
        }
user_9
 
user_9
        foreach ($this->tabs as $tab) {
user_9
            $code .= $tab->getCode();
user_9
        }
user_9
 
user_9
        EventManager::raiseEvent("tabber_get_tabber", array('code' => &$code, 'instance' => &$this));
user_9
 
user_9
        $code .= "</div>";
user_9
        return $code;
user_9
    }
user_9
 
user_9
    public function show () {
user_9
        echo $this->getCode();
user_9
    }
user_9
 
user_9
}
user_9
 
user_9
?>