public function test_failed_log_creates_message() { error_reporting(0); $msg = Template::message(); $this->assertIsA($msg, 'string'); error_reporting(E_ALL); }
/** * Sets a status message (for displaying small success/error messages). * * This function is used in place of the session->flashdata function to allow * the message to show up without requiring a page refresh. * * @param string $message The text of the message. * @param string $type The type of message, usually added as the value of * the class attribute on the message's container. * * @return void */ public static function set_message($message = '', $type = 'info') { if (empty($message)) { return; } if (!self::$ignore_session && isset(self::$ci->session)) { self::$ci->session->set_flashdata('message', "{$type}::{$message}"); } self::$message = array('type' => $type, 'message' => $message); }
$registerClass = ' required'; $validation_errors = validation_errors(); ?> <div id='page-wrapper' class="gray-bg" style="margin-top:50px;"> <div class="row wrapper border-bottom white-bg page-heading"> <div class="col-lg-10"> <h2>Create new Group</h2> </div> <div class="col-lg-2"> </div> </div> <?php if ($validation_errors) { echo Template::message(); ?> <div class='alert alert-block alert-error fade in'> <a class='close' data-dismiss='alert'>×</a> <h4 class='alert-heading'> <?php echo lang('groups_errors_message'); ?> </h4> <?php echo $validation_errors; ?> </div> <?php } $id = isset($groups->id) ? $groups->id : '';
<title><?php echo config_item('site.title'); ?></title> <?php Assets::css(); ?> </head> <body> <div class="page"> <!-- Header --> <div class="head text-right"> <h1>Bonfire</h1> </div> <div class="main"> <?php echo Template::message(); ?> <?php echo Template::yield(); ?> </div> <!-- /main --> </div> <!-- /page --> <div class="foot"> <?php if (ENVIRONMENT == 'development') :?> <p style="float: right; margin-right: 80px;">Page rendered in {elapsed_time} seconds, using {memory_usage}.</p> <?php endif; ?> <p>Powered by <a href="http://cibonfire.com" target="_blank">Bonfire <?php echo BONFIRE_VERSION ?></a></p> </div> <?php Assets::js(); ?> </body>
public static function set_message($message='', $type='info') { if (!empty($message)) { if (class_exists('CI_Session')) { self::$ci->session->set_flashdata('message', $type.'::'.$message); } self::$message = array('type'=>$type, 'message'=>$message); } }
/** * Sets a status message (for displaying small success/error messages). * This function is used in place of the session->flashdata function, * because you don't always want to have to refresh the page to get the * message to show up. * * @access public * @static * * @param string $message A string with the message to save. * @param string $type A string to be included as the CSS class of the containing div. * * @return void */ public static function set_message($message = '', $type = 'info') { if (!empty($message)) { if (isset(self::$ci->session) && !self::$ignore_session) { self::$ci->session->set_flashdata('message', $type . '::' . $message); } self::$message = array('type' => $type, 'message' => $message); } }
public function contact() { $l_oTemplate = new Template(); $l_oTemplate->header($this->m_sSubject); $l_oTemplate->info(['Name' => $this->m_sName, 'Email' => $this->m_sEmail]); $l_oTemplate->message('Enquiry', $this->m_sMessage); $l_oTemplate->footer(); $this->m_sMailBody = $l_oTemplate->emailTemplate(); return $this->submit(); }