v26.6.0 updates
This commit is contained in:
@@ -1,25 +1,4 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of Ice Framework.
|
||||
|
||||
Ice Framework is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Ice Framework is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Ice Framework. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
||||
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
|
||||
*/
|
||||
namespace Classes;
|
||||
|
||||
abstract class SubActionManager
|
||||
@@ -56,16 +35,19 @@ abstract class SubActionManager
|
||||
$this->emailTemplates = $emailTemplates;
|
||||
}
|
||||
|
||||
public function getEmailTemplate($name)
|
||||
public function getEmailTemplate($name, $modulePath = null)
|
||||
{
|
||||
if ($modulePath == null) {
|
||||
$modulePath = MODULE_PATH;
|
||||
}
|
||||
//Read module email templates
|
||||
if ($this->emailTemplates == null) {
|
||||
$this->emailTemplates = array();
|
||||
if (is_dir(MODULE_PATH.'/emailTemplates/')) {
|
||||
$ams = scandir(MODULE_PATH.'/emailTemplates/');
|
||||
if (is_dir($modulePath.'/emailTemplates/')) {
|
||||
$ams = scandir($modulePath.'/emailTemplates/');
|
||||
foreach ($ams as $am) {
|
||||
if (!is_dir(MODULE_PATH.'/emailTemplates/'.$am) && $am != '.' && $am != '..') {
|
||||
$this->emailTemplates[$am] = file_get_contents(MODULE_PATH.'/emailTemplates/'.$am);
|
||||
if (!is_dir($modulePath.'/emailTemplates/'.$am) && $am != '.' && $am != '..') {
|
||||
$this->emailTemplates[$am] = file_get_contents($modulePath.'/emailTemplates/'.$am);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user