/home/coolpkct/www/websites/cake3.cool.rocks/admin/classes/buttonbar.php
<?php
/**
 * Part of Showkase web site management package
 *
 * @package Showkase
 * @author Jack Hardie {@link http://www.jhardie.com}
 * @copyright Copyright (c) 2012, SimpleViewer Inc.
 */
defined('SK_ACCESS')||die('<h1>403: Forbidden</h1>');
 
/**
 * Creates Title, close link and buttonbar
 *
 * @package Showkase
 */
class Buttonbar
{
    /**
     * Class name for ul tag
     */
    protected $ulClass = '';
    
    /**
     * links variable is normally overwritten by child class
     */
    protected $links = array();
    
    /**
     * Get html for buttonbar
     *
     * @return string
     * @param Page object
     */
    public function getHtml()
    {
        $linkHtml = '';
        foreach ($this->links as $link) {
            if (file_exists('commands'.DIRECTORY_SEPARATOR.$link['cmd'].'.php')) {
                $linkHtml .= <<<EOT
            <li class="{$link['class']}">
              <a href="index.php?cmd={$link['cmd']}" title="{$link['title']}">{$link['text']}</a>
            </li>
EOT;
            }
        }
        $html = <<<EOD
        <ul class="{$this->ulClass}">
          {$linkHtml}
        </ul>
EOD;
        return $html;
          
    }

}