45 private $simpleFactory;
52 private $themeFactory;
59 private $modularSwitchFactory;
66 private $moduleFactory;
79 Rule\SimpleFactory $simpleFactory,
81 Rule\ModuleFactory $moduleFactory,
82 Rule\ModularSwitchFactory $modularSwitchFactory
85 $this->simpleFactory = $simpleFactory;
86 $this->themeFactory = $themeFactory;
87 $this->moduleFactory = $moduleFactory;
88 $this->modularSwitchFactory = $modularSwitchFactory;
98 return $this->themeFactory->create(
99 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<theme_dir>"])]
110 return $this->modularSwitchFactory->create(
112 $this->themeFactory->create(
113 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<theme_dir>/templates"])]
117 $this->themeFactory->create(
118 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<theme_dir>/<module_name>/templates"])]
120 $this->moduleFactory->create(
121 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<module_dir>/view/<area>/templates"])]
123 $this->moduleFactory->create(
124 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<module_dir>/view/base/templates"])]
138 return $this->modularSwitchFactory->create(
139 [
'ruleNonModular' => $this->themeFactory->create(
140 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<theme_dir>"])]
144 $this->themeFactory->create(
145 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<theme_dir>/<module_name>"])]
147 $this->moduleFactory->create(
148 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<module_dir>/view/<area>"])]
150 $this->moduleFactory->create(
151 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<module_dir>/view/base"])]
166 return $this->modularSwitchFactory->create(
169 $this->themeFactory->create(
175 'pattern' =>
"<theme_dir>/web/i18n/<locale>",
176 'optionalParams' => [
'locale']
179 ->create([
'pattern' =>
"<theme_dir>/web"]),
182 'pattern' =>
"<theme_pubstatic_dir>",
183 'optionalParams' => [
'theme_pubstatic_dir']
188 $this->simpleFactory->create([
'pattern' => $libDir]),
193 $this->themeFactory->create(
197 $this->simpleFactory->create(
199 'pattern' =>
"<theme_dir>/<module_name>/web/i18n/<locale>",
200 'optionalParams' => [
'locale'],
203 $this->simpleFactory->create(
204 [
'pattern' =>
"<theme_dir>/<module_name>/web"]
209 $this->moduleFactory->create(
210 [
'rule' => $this->simpleFactory->create(
212 'pattern' =>
"<module_dir>/view/<area>/web/i18n/<locale>",
213 'optionalParams' => [
'locale']
217 $this->moduleFactory->create(
218 [
'rule' => $this->simpleFactory->create(
220 'pattern' =>
"<module_dir>/view/base/web/i18n/<locale>",
221 'optionalParams' => [
'locale']
225 $this->moduleFactory->create(
226 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<module_dir>/view/<area>/web"])]
228 $this->moduleFactory->create(
229 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<module_dir>/view/base/web"])]
247 $this->themeFactory->create(
249 $this->simpleFactory->create(
250 [
'pattern' =>
"<theme_dir>/<module_name>/email"]
253 $this->moduleFactory->create(
254 [
'rule' => $this->simpleFactory->create([
'pattern' =>
"<module_dir>/view/<area>/email"])]
269 if (isset($this->rules[
$type])) {
270 return $this->rules[
$type];
289 throw new \InvalidArgumentException(
"Fallback rule '$type' is not supported");
292 return $this->rules[
$type];
createEmailTemplateFileRule()
__construct(\Magento\Framework\Filesystem $filesystem, Rule\SimpleFactory $simpleFactory, Rule\ThemeFactory $themeFactory, Rule\ModuleFactory $moduleFactory, Rule\ModularSwitchFactory $modularSwitchFactory)
const TYPE_EMAIL_TEMPLATE