Added method getLayout() to Controller (#3765)

Credit to @ebashu-on-holidays
This commit is contained in:
Alexander Shapoval 2018-09-10 03:55:10 +03:00 committed by Luke Towers
parent 4ec3b525e0
commit 709790a05d
1 changed files with 11 additions and 0 deletions

View File

@ -1134,6 +1134,17 @@ class Controller
return $this->layoutObj;
}
/**
* Returns the CMS layout object being processed by the controller.
* The object is not available on the early stages of the controller
* initialization.
* @return \Cms\Classes\Layout Returns the Layout object or null.
*/
public function getLayout()
{
return $this->layout;
}
//
// Page helpers
//