Public Member Functions | Static Public Member Functions | Static Public Attributes

ilPDSysMessageBlockGUI Class Reference

BlockGUI class for System Messages block on personal desktop. More...

Inheritance diagram for ilPDSysMessageBlockGUI:
Collaboration diagram for ilPDSysMessageBlockGUI:

Public Member Functions

 ilPDSysMessageBlockGUI ()
 Constructor.
 getHTML ()
 Get HTML.
 getMails ()
 Get Mails.
 getOverview ()
 Get overview.

Static Public Member Functions

static getBlockType ()
 Get block type.
static isRepositoryObject ()
 Get block type.

Static Public Attributes

static $block_type = "pdsysmess"

Detailed Description

BlockGUI class for System Messages block on personal desktop.

Author:
Alex Killing <alex.killing@gmx.de>
Version:
$Id$

ilPDSysMessageBlockGUI: ilColumnGUI

Definition at line 34 of file class.ilPDSysMessageBlockGUI.php.


Member Function Documentation

static ilPDSysMessageBlockGUI::getBlockType (  )  [static]

Get block type.

Returns:
string Block type.

Reimplemented from ilPDMailBlockGUI.

Definition at line 57 of file class.ilPDSysMessageBlockGUI.php.

        {
                return self::$block_type;
        }

ilPDSysMessageBlockGUI::getHTML (  ) 

Get HTML.

Reimplemented from ilPDMailBlockGUI.

Definition at line 72 of file class.ilPDSysMessageBlockGUI.php.

References ilBlockGUI::getCurrentDetailLevel(), and ilBlockGUI::setCurrentDetailLevel().

        {
                if ($this->getCurrentDetailLevel() < 1)
                {
                        $this->setCurrentDetailLevel(1);
                }

                $html = parent::getHTML();
                
                if (count($this->mails) == 0)
                {
                        return "";
                }
                else
                {
                        return $html;
                }
        }

Here is the call graph for this function:

ilPDSysMessageBlockGUI::getMails (  ) 

Get Mails.

Reimplemented from ilPDMailBlockGUI.

Definition at line 94 of file class.ilPDSysMessageBlockGUI.php.

References $_SESSION.

        {
                global $ilUser;
                
                // BEGIN MAILS
                $umail = new ilMail($_SESSION["AccountId"]);
                $mbox = new ilMailBox($_SESSION["AccountId"]);
                $inbox = $mbox->getInboxFolder();
                
                //SHOW MAILS FOR EVERY USER
                $mail_data = $umail->getMailsOfFolder($inbox);
                $mail_counter = $umail->getMailCounterData();
                $unreadmails = 0;
        
                $this->mails = array();
                foreach ($mail_data as $mail)
                {
                        //ONLY NEW MAILS WOULD BE ON THE PERONAL DESKTOP
                        if($mail["m_status"] == 'unread' &&
                                in_array('system',$mail['m_type']))
                        {
                                $this->mails[] = $mail;
                        }
                }
        }

ilPDSysMessageBlockGUI::getOverview (  ) 

Get overview.

Reimplemented from ilPDMailBlockGUI.

Definition at line 123 of file class.ilPDSysMessageBlockGUI.php.

References $ilCtrl, and $lng.

        {
                global $ilUser, $lng, $ilCtrl;
                                
                return '<div class="small">'.((int) count($this->mails))." ".$lng->txt("system_message")."</div>";
        }

ilPDSysMessageBlockGUI::ilPDSysMessageBlockGUI (  ) 

Constructor.

Definition at line 41 of file class.ilPDSysMessageBlockGUI.php.

References $ilCtrl, $lng, ilUtil::getImagePath(), ilPDMailBlockGUI::ilPDMailBlockGUI(), ilBlockGUI::setAvailableDetailLevels(), ilBlockGUI::setImage(), and ilBlockGUI::setTitle().

        {
                global $ilCtrl, $lng, $ilUser;
                parent::ilPDMailBlockGUI();
                $this->setImage(ilUtil::getImagePath("icon_sysmess_s.gif"));
                $this->setTitle($lng->txt("system_message"));
                $this->setAvailableDetailLevels(3, 1);
                $this->mail_mode = "system";
                $this->allow_moving = false;
        }

Here is the call graph for this function:

static ilPDSysMessageBlockGUI::isRepositoryObject (  )  [static]

Get block type.

Returns:
string Block type.

Reimplemented from ilPDMailBlockGUI.

Definition at line 67 of file class.ilPDSysMessageBlockGUI.php.

        {
                return false;
        }


Field Documentation

ilPDSysMessageBlockGUI::$block_type = "pdsysmess" [static]

Reimplemented from ilPDMailBlockGUI.

Definition at line 36 of file class.ilPDSysMessageBlockGUI.php.


The documentation for this class was generated from the following file: