Add getStatusCode() in Cms\Classes\Controller (#2959)

Related: #2953. Provide a method to access the current statusCode of a CMS controller.
This commit is contained in:
Max Schmitt 2017-07-08 16:53:08 +02:00 committed by Luke Towers
parent e8e4209909
commit aeba740243
1 changed files with 9 additions and 0 deletions

View File

@ -1022,6 +1022,15 @@ class Controller
// Getters
//
/**
* Returns the status code for the current web response.
* @return int Status code
*/
public function getStatusCode()
{
return $this->statusCode;
}
/**
* Returns an existing instance of the controller.
* If the controller doesn't exists, returns null.