mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Implemented method to set layout and template.
This commit is contained in:
parent
131a62f9cb
commit
bd5e5376d1
1 changed files with 16 additions and 2 deletions
|
@ -112,14 +112,14 @@ class CakeEmail {
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
public $layout = 'default';
|
||||
protected $_layout = 'default';
|
||||
|
||||
/**
|
||||
* Template for the view
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $template = null;
|
||||
protected $_template = '';
|
||||
|
||||
/**
|
||||
* as per RFC2822 Section 2.1.1
|
||||
|
@ -584,6 +584,20 @@ class CakeEmail {
|
|||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the layout and template
|
||||
*
|
||||
* @param string $layout
|
||||
* @param string $template
|
||||
* @return void
|
||||
*/
|
||||
public function setLayout($layout, $template = null) {
|
||||
$this->_layout = (string)$layout;
|
||||
if ($template !== null) {
|
||||
$this->_template = (string)$template;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an email using the specified content, template and layout
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue