* @category Horde * @copyright 2012-2017 Horde LLC * @license http://www.horde.org/licenses/gpl GPL * @package IMP */ class IMP_View_Subinfo extends Horde_View { /** * Constructor. * * @param array $config Configuration key-value pairs. Additional options: * - mailbox: (string) Mailbox to use for quota query. */ public function __construct(array $config = array()) { $config['templatePath'] = IMP_TEMPLATES . '/basic'; parent::__construct($config); $quotadata = $GLOBALS['injector']->getInstance('IMP_Quota_Ui')->quota(isset($config['mailbox']) ? $config['mailbox'] : null, true); if (!empty($quotadata)) { $this->quotaClass = $quotadata['class']; $this->quotaText = $quotadata['message']; } } /** * Returns the HTML code for the subinfo bar. * * @param string $name The template to process. * * @return string The subinfo bar's HTML code. */ public function render($name = 'subinfo', $locals = array()) { return parent::render($name, $locals); } }