|
@@ 81-92 (lines=12) @@
|
| 78 |
|
* @param string $locale - locale name |
| 79 |
|
* @return array |
| 80 |
|
*/ |
| 81 |
|
public function getView($type, $locale = NULL) { |
| 82 |
|
$locale = $locale ? $locale : \MY_Controller::defaultLocale(); |
| 83 |
|
$type = $this->getPagesTypes($type); |
| 84 |
|
|
| 85 |
|
if (!$type OR !$type['class'] OR !class_exists($type['class'])) { |
| 86 |
|
return NULL; |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
$typeObj = new $type['class']($locale); |
| 90 |
|
|
| 91 |
|
return $typeObj->getView(); |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
/** |
| 95 |
|
* Get banner page type allowed pages list |
|
@@ 100-111 (lines=12) @@
|
| 97 |
|
* @param string $locale - locale name |
| 98 |
|
* @return array |
| 99 |
|
*/ |
| 100 |
|
public function getPages($type, $locale = NULL) { |
| 101 |
|
$locale = $locale ? $locale : \MY_Controller::defaultLocale(); |
| 102 |
|
$type = $this->getPagesTypes($type); |
| 103 |
|
|
| 104 |
|
if (!$type OR !$type['class'] OR !class_exists($type['class'])) { |
| 105 |
|
return NULL; |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
$typeObj = new $type['class']($locale); |
| 109 |
|
|
| 110 |
|
return $typeObj->getPages(); |
| 111 |
|
} |
| 112 |
|
} |