Пример #1
0
 function ExtcalEventHandler(&$db)
 {
     $this->_extcalPerm = ExtcalPerm::getHandler();
     $this->_extcalTime = ExtcalTime::getHandler();
     $extcalConfig = ExtcalConfig::getHandler();
     $this->_extcalConfig = $extcalConfig->getModuleConfig();
     $this->ExtcalPersistableObjectHandler($db, 'extcal_event', 'ExtcalEvent', 'event_id');
 }
Пример #2
0
function bExtcalRandomShow($options)
{
    include_once XOOPS_ROOT_PATH . '/modules/extcal/class/config.php';
    // Retriving module config
    $extcalConfig = ExtcalConfig::getHandler();
    $xoopsModuleConfig = $extcalConfig->getModuleConfig();
    $eventHandler = xoops_getmodulehandler('event', 'extcal');
    $nbEvent = $options[0];
    $titleLenght = $options[1];
    array_shift($options);
    array_shift($options);
    // Checking if no cat is selected
    if (count($options) == 1 && $options[0] == 0) {
        $options = 0;
    }
    $events = $eventHandler->objectToArray($eventHandler->getRandomEvent($nbEvent, $options));
    $eventHandler->formatEventsDate($events, $xoopsModuleConfig['event_date_month']);
    return $events;
}