function rex_notification_component()
 {
     global $I18N;
     parent::rex_dashboard_component_base('notifications');
     $this->setTitle($I18N->msg('dashboard_notifications'));
     $this->setFormat('full');
 }
 function rex_rss_reader_component()
 {
     // default cache lifetime in seconds
     $cache_options['lifetime'] = 3600;
     parent::rex_dashboard_component('rss-reader', $cache_options);
     $this->setConfig(new rex_rss_reader_component_config());
     $this->setFormat('full');
 }
 function rex_cronjob_component()
 {
     global $I18N;
     parent::rex_dashboard_component('cronjob');
     $this->setTitle($I18N->msg('cronjob_dashboard_component_title'));
     $this->setTitleUrl('index.php?page=cronjob');
     $this->setFormat('full');
     $this->setBlock($I18N->msg('cronjob_dashboard_block'));
 }
 function rex_media_component()
 {
     global $I18N;
     parent::rex_dashboard_component('userinfo-media');
     $this->setTitle($I18N->msg('userinfo_component_media_title'));
     $this->setTitleUrl('javascript:openMediaPool();');
     $this->setBlock($I18N->msg('userinfo_block_latest_infos'));
 }
Beispiel #5
0
$content = $component->get();
if ($content != '') {
    $contentFound = true;
    echo '<div class="rex-dashboard-section rex-dashboard-1col rex-dashboard-notifications">
                    <div class="rex-dashboard-column rex-dashboard-column-first">
                        ' . $content . '
                    </div>
                </div>';
}
// ----- EXTENSION POINT
$dashboard_components = array();
$dashboard_components = rex_register_extension_point('DASHBOARD_COMPONENT', $dashboard_components);
// ------------ sort components by block and format
$components = array();
foreach ($dashboard_components as $index => $component) {
    if (rex_dashboard_component::isValid($component) && $component->checkPermission()) {
        $block = $component->getBlock();
        $format = $component->getFormat();
        if ($block == '' && $format == 'half') {
            $block = $I18N->msg('dashboard_component_block_misc');
        }
        if (!isset($components[$format])) {
            $components[$format] = array();
        }
        if (!isset($components[$format][$block])) {
            $components[$format][$block] = array();
        }
        $components[$format][$block][] = $component;
    }
    unset($dashboard_components[$index]);
}