示例#1
0
 public function getInstance()
 {
     if ($this->instance == null) {
         $this->instance = new $this->class();
         $this->instance->setClub(\Club\Club::getInstance());
         $this->instance->init();
     }
     return $this->instance;
 }
示例#2
0
 public function getDateFormat($type = "php")
 {
     $module = \Club\Club::getInstance()->getModules()->getModule("calendar");
     $default = "de";
     if ($module != NULL) {
         foreach ($module->getSettings() as $setting) {
             if ($setting["key"] == "calender_time_format") {
                 $default = $setting["default"];
             }
         }
     }
     $formatString = get_option("calender_time_format", $default);
     return self::$FORMATS[$formatString][$type];
 }
示例#3
0
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$modules = \Club\Club::getInstance()->getModules();
?>

<div class="wrap">
<h2>Club Plugin Einstellugne</h2>
<form method="post" action="options.php"> 
    <?php 
settings_fields('club-settings');
?>
    <?php 
do_settings_sections('club-settings');
?>
    <table class="form-table">
        <?php 
foreach ($modules->getSettings() as $setting) {
    $default = false;
    if (array_key_exists("default", $setting)) {
        $default = $setting["default"];
    }
    ?>
        <tr valign="top">
        <th scope="row"><?php 
    echo $setting["displayName"];
    ?>
示例#4
0
use Ramsey\Uuid\Uuid;
use Club\Admin\Calendar\Event;
$uuid = filter_input(INPUT_GET, "uuid");
$edit = false;
$event = null;
if (!Uuid::isValid($uuid)) {
    $uuid = null;
    $event = new Event();
} else {
    $event = Event::findById($uuid);
    $edit = true;
}
$defaultFormat = "";
$momentFormat = "";
$module = \Club\Club::getInstance()->getModules()->getModuleInstance("calendar");
if ($module != NULL) {
    $defaultFormat = $module->getDateFormat();
    $momentFormat = $module->getDateFormat("moment");
}
?>

<div class="bootstrap-wrapper">
    <div class="container">
        <h1>Club Termine</h1>
        <form class="form-horizontal">
            <div class="form-group" id="divTitle" class="can-have-error">
                <label for="txtTitle" class="col-sm-2 control-label">Title</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control can-have-error" value="<?php 
echo $event->getTitle();
示例#5
0
 public function registerMenus()
 {
     $club = \Club\Club::getInstance();
     $baseDir = $club->plugin_base;
     foreach ($this->activated as $name) {
         $menus = $this->getModule($name)->getMenu();
         $this->registerJsonMenu($menus, $baseDir, $club, $name);
     }
 }
示例#6
0
 /**
  * 
  * @param \Club\Modules\Page $page
  */
 protected function registerPage($page)
 {
     $club = \Club\Club::getInstance();
     $club->registerPage($page);
 }
示例#7
0
<?php

$club = \Club\Club::getInstance();
$module = $club->getModules()->getModules();
$activ = $club->getModules()->getActivated();
?>

<div class="bootstrap-wrapper">
    <div class="container">
        <h1>Club Module</h1>
        <table class="table table-hover table-striped">
            <thead>
                <tr>
                    <th>Modul</th>
                    <th>Beschreibung</th>
                    <th>&nbsp;</th>
                </tr>
            </thead>
            <tbody>
                <?php 
foreach ($module as $mod) {
    ?>
                    <tr>
                        <td><?php 
    echo $mod->getName();
    ?>
</td>
                        <td><?php 
    echo $mod->getDescription();
    ?>
</td>