API16

JError/translateErrorLevel: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 43: Line 43:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=translateErrorLevel
  category=translateErrorLevel
  category=JError
  category=JError
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 01:37, 25 March 2017

Description

Translate an error level integer to a human readable string e.g. E_ERROR will be translated to 'Error'


<! removed transcluded page call, red link never existed >

Syntax

static translateErrorLevel($level)
Parameter Name Default Value Description
$level $level Error level to translate

Returns

mixed Human readable error level name or boolean false if it doesn't exist

Defined in

libraries/joomla/error/error.php

Importing

jimport( 'joomla.error.error' );

Source Body

public static function translateErrorLevel($level)
{
        if (isset(JError::$levels[$level])) {
                return JError::$levels[$level];
        }
        return false;
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples