Skip to content

Commit 0a9c02e

Browse files
committed
bug get all statict_texts
1 parent 00729a4 commit 0a9c02e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Omatech/Editora/Connector/Helper/StaticTextHelper.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,13 @@ function _statictext($text, $replacements = [], $locale = null) {
1818
$message = new StaticTexts();
1919
return $message->getOneStaticText($text, $replacements, $locale);
2020
}
21+
22+
function _allStatictext($locale = null) {
23+
$message = new StaticTexts();
24+
if($locale!=null){
25+
return $message->todos_lang($locale);
26+
}else{
27+
return $message->todos();
28+
}
29+
}
2130
}

src/Omatech/Editora/Connector/Models/StaticTexts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class StaticTexts extends Model {
1414
protected $table = 'omp_static_text';
1515

1616
public static function todos() {
17-
$txt = "";
17+
$txt = [];
1818
$texts = self::where('language', App::getLocale())->get();
1919

2020
foreach($texts as $text) {
@@ -25,7 +25,7 @@ public static function todos() {
2525
}
2626

2727
public static function todos_lang($lang) {
28-
$txt = "";
28+
$txt = [];
2929
$texts = self::where('language', $lang)->get();
3030

3131
foreach($texts as $text) {

0 commit comments

Comments
 (0)