/** * Render * * @return void * @access public */ function render_html() { // get the messages quee $this->_content = org_glizy_application_MessageStack::get($this->getAttribute('type')); if (count($this->_content) || $this->getAttribute('showEmpty')) { $attributes = array(); $attributes['id'] = $this->getId(); $attributes['class'] = $this->getAttribute('cssClass'); $output = '<div ' . $this->_renderAttributes($attributes) . '>'; if (count($this->_content)) { if (!is_null($this->getAttribute('message'))) { $output .= '<p>' . $this->getAttribute('message') . '</p>'; } $output .= '<ul>'; foreach ($this->_content as $v) { $output .= '<li>' . $v . '</li>'; } $output .= '</ul>'; } $output .= '</div>'; $this->addOutputCode($output); org_glizy_application_MessageStack::reset($this->getAttribute('type')); } }
/** * @param $msg * @param string $debugInfo * @param bool $type * @param string $group * @param bool $addUserInfo */ function logAndMessage($msg, $debugInfo = '', $type = false, $group = '', $addUserInfo = false) { $type = $type === false || $type === true ? $type ? GLZ_LOG_ERROR : GLZ_LOG_DEBUG : $type; if (class_exists('org_glizy_application_MessageStack')) { org_glizy_application_MessageStack::add($msg, $type == GLZ_LOG_ERROR ? GLZ_MESSAGE_ERROR : GLZ_MESSAGE_SUCCESS); } $this->log($msg . ' ' . $debugInfo, $type, $group, $addUserInfo); }
/** * @param $message */ function validateAddError($message) { $validateError =& org_glizy_components_Component::validateErrors(); $validateError[] = array('component' => &$this, 'message' => $message); org_glizy_application_MessageStack::add($message, GLZ_MESSAGE_ERROR); }