Redaxscript\Messenger::error PHP Method

error() public method

error message
Since: 3.0.0
public error ( mixed $message = null, string $title = null ) : string
$message mixed message of the error
$title string title of the error
return string
    public function error($message = null, $title = null)
    {
        return $this->render('error', $message, $title);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * testError
  *
  * @since 3.0.0
  *
  * @param array $error
  * @param array $actionArray
  * @param string $expect
  *
  * @dataProvider providerError
  */
 public function testError($error = null, $actionArray = null, $expect = null)
 {
     /* setup */
     $messenger = new Messenger($this->_registry);
     $messenger->setRoute($actionArray['text'], $actionArray['route']);
     /* actual */
     $actual = $messenger->error($error['message'], $error['title']);
     /* compare */
     $this->assertEquals($expect, $actual);
 }
All Usage Examples Of Redaxscript\Messenger::error