@@ 54-64 (lines=11) @@ | ||
51 | * This will be usefull when creating the ML object for the first time. Then we will be able |
|
52 | * to create translations. |
|
53 | */ |
|
54 | public function stripMultilanguageFields() |
|
55 | { |
|
56 | $objectVars =& $this->getVars(); |
|
57 | $newObjectVars = []; |
|
58 | foreach ($objectVars as $key => $var) { |
|
59 | if (!$var['multilingual']) { |
|
60 | $newObjectVars[$key] = $var; |
|
61 | } |
|
62 | } |
|
63 | $this->vars = $newObjectVars; |
|
64 | } |
|
65 | ||
66 | public function stripNonMultilanguageFields() |
|
67 | { |
|
@@ 66-76 (lines=11) @@ | ||
63 | $this->vars = $newObjectVars; |
|
64 | } |
|
65 | ||
66 | public function stripNonMultilanguageFields() |
|
67 | { |
|
68 | $objectVars =& $this->getVars(); |
|
69 | $newObjectVars = []; |
|
70 | foreach ($objectVars as $key => $var) { |
|
71 | if ($var['multilingual'] || $key == $this->handler->keyName) { |
|
72 | $newObjectVars[$key] = $var; |
|
73 | } |
|
74 | } |
|
75 | $this->vars = $newObjectVars; |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * Make non multilanguage fields read only |