Exemple #1
0
 /**
  * The alias of helper function htmlMsgBox() for simple using in views.
  * Prints the result of that function.
  * @param string $msg
  * @param string $class
  * @param bool $use_span set TRUE if you need to use span instead div
  * @return View_Helper_Html
  */
 public function notifier($msg, $class = '-i-box -i-simple-box', $use_span = false)
 {
     print htmlMsgBox($msg, $class, $use_span);
     return $this;
 }
Exemple #2
0
/**
 * Returns a status labels.
 * @param string $value
 * @param string $label_on
 * @param string $label_off
 * @return string
 */
function htmlStatus($value, $label_on = '', $label_off = '')
{
    if (empty($label_on)) {
        $label_on = htmlMsgBox(__('Active'), '-i-label-active', true);
    }
    if (empty($label_off)) {
        $label_off = htmlMsgBox(__('Inactive'), '-i-label-inactive', true);
    }
    return empty($value) ? $label_off : $label_on;
}