@@ -135,7 +135,7 @@ |
||
| 135 | 135 | * Creates a list of all available translations. |
| 136 | 136 | * |
| 137 | 137 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object |
| 138 | - * @return array List of language IDs with labels |
|
| 138 | + * @return string List of language IDs with labels |
|
| 139 | 139 | */ |
| 140 | 140 | protected function getJsonLanguages( \Aimeos\MShop\Context\Item\Iface $context ) |
| 141 | 141 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | /** |
| 76 | 76 | * Returns the HTML code for a copy of a resource object |
| 77 | 77 | * |
| 78 | - * @return string Generated output |
|
| 78 | + * @return \Illuminate\Contracts\View\View Generated output |
|
| 79 | 79 | */ |
| 80 | 80 | public function copyAction() |
| 81 | 81 | { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | /** |
| 92 | 92 | * Returns the HTML code for a new resource object |
| 93 | 93 | * |
| 94 | - * @return string Generated output |
|
| 94 | + * @return \Illuminate\Contracts\View\View Generated output |
|
| 95 | 95 | */ |
| 96 | 96 | public function createAction() |
| 97 | 97 | { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | /** |
| 108 | 108 | * Deletes the resource object or a list of resource objects |
| 109 | 109 | * |
| 110 | - * @return string Generated output |
|
| 110 | + * @return \Illuminate\Contracts\View\View Generated output |
|
| 111 | 111 | */ |
| 112 | 112 | public function deleteAction() |
| 113 | 113 | { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | /** |
| 124 | 124 | * Returns the HTML code for the requested resource object |
| 125 | 125 | * |
| 126 | - * @return string Generated output |
|
| 126 | + * @return \Illuminate\Contracts\View\View Generated output |
|
| 127 | 127 | */ |
| 128 | 128 | public function getAction() |
| 129 | 129 | { |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | /** |
| 140 | 140 | * Saves a new resource object |
| 141 | 141 | * |
| 142 | - * @return string Generated output |
|
| 142 | + * @return \Illuminate\Contracts\View\View Generated output |
|
| 143 | 143 | */ |
| 144 | 144 | public function saveAction() |
| 145 | 145 | { |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | /** |
| 156 | 156 | * Returns the HTML code for a list of resource objects |
| 157 | 157 | * |
| 158 | - * @return string Generated output |
|
| 158 | + * @return \Illuminate\Contracts\View\View Generated output |
|
| 159 | 159 | */ |
| 160 | 160 | public function searchAction() |
| 161 | 161 | { |
@@ -9,57 +9,57 @@ |
||
| 9 | 9 | |
| 10 | 10 | if( !function_exists( 'aiconfig' ) ) |
| 11 | 11 | { |
| 12 | - /** |
|
| 13 | - * Returns the configuration setting for the given key |
|
| 14 | - * |
|
| 15 | - * @param string $key Configuration key |
|
| 16 | - * @param mixed $default Default value if the configuration key isn't found |
|
| 17 | - * @return mixed Configuration value |
|
| 18 | - */ |
|
| 19 | - function aiconfig( $key, $default = null ) |
|
| 20 | - { |
|
| 21 | - return app( '\Aimeos\Shop\Base\Config' )->get()->get( $key, $default ); |
|
| 22 | - } |
|
| 12 | + /** |
|
| 13 | + * Returns the configuration setting for the given key |
|
| 14 | + * |
|
| 15 | + * @param string $key Configuration key |
|
| 16 | + * @param mixed $default Default value if the configuration key isn't found |
|
| 17 | + * @return mixed Configuration value |
|
| 18 | + */ |
|
| 19 | + function aiconfig( $key, $default = null ) |
|
| 20 | + { |
|
| 21 | + return app( '\Aimeos\Shop\Base\Config' )->get()->get( $key, $default ); |
|
| 22 | + } |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | if( !function_exists( 'aitrans' ) ) |
| 27 | 27 | { |
| 28 | - /** |
|
| 29 | - * Translates the given message |
|
| 30 | - * |
|
| 31 | - * @param string $singular Message to translate |
|
| 32 | - * @param array $params List of paramters for replacing the placeholders in that order |
|
| 33 | - * @param string $domain Translation domain |
|
| 34 | - * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US" |
|
| 35 | - * @return string Translated string |
|
| 36 | - */ |
|
| 37 | - function aitrans( $singular, array $params = array(), $domain = 'client', $locale = null ) |
|
| 38 | - { |
|
| 39 | - $i18n = app( '\Aimeos\Shop\Base\Context' )->get()->getI18n( $locale ); |
|
| 28 | + /** |
|
| 29 | + * Translates the given message |
|
| 30 | + * |
|
| 31 | + * @param string $singular Message to translate |
|
| 32 | + * @param array $params List of paramters for replacing the placeholders in that order |
|
| 33 | + * @param string $domain Translation domain |
|
| 34 | + * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US" |
|
| 35 | + * @return string Translated string |
|
| 36 | + */ |
|
| 37 | + function aitrans( $singular, array $params = array(), $domain = 'client', $locale = null ) |
|
| 38 | + { |
|
| 39 | + $i18n = app( '\Aimeos\Shop\Base\Context' )->get()->getI18n( $locale ); |
|
| 40 | 40 | |
| 41 | - return vsprintf( $i18n->dt( $domain, $singular ), $params ); |
|
| 42 | - } |
|
| 41 | + return vsprintf( $i18n->dt( $domain, $singular ), $params ); |
|
| 42 | + } |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | if( !function_exists( 'aitransplural' ) ) |
| 47 | 47 | { |
| 48 | - /** |
|
| 49 | - * Translates the given messages based on the number |
|
| 50 | - * |
|
| 51 | - * @param string $singular Message to translate |
|
| 52 | - * @param string $plural Message for plural translations |
|
| 53 | - * @param integer $number Count of items to chose the correct plural translation |
|
| 54 | - * @param array $params List of paramters for replacing the placeholders in that order |
|
| 55 | - * @param string $domain Translation domain |
|
| 56 | - * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US" |
|
| 57 | - * @return string Translated string |
|
| 58 | - */ |
|
| 59 | - function aitransplural( $singular, $plural, $number, array $params = array(), $domain = 'client', $locale = null ) |
|
| 60 | - { |
|
| 61 | - $i18n = app( '\Aimeos\Shop\Base\Context' )->get()->getI18n( $locale ); |
|
| 48 | + /** |
|
| 49 | + * Translates the given messages based on the number |
|
| 50 | + * |
|
| 51 | + * @param string $singular Message to translate |
|
| 52 | + * @param string $plural Message for plural translations |
|
| 53 | + * @param integer $number Count of items to chose the correct plural translation |
|
| 54 | + * @param array $params List of paramters for replacing the placeholders in that order |
|
| 55 | + * @param string $domain Translation domain |
|
| 56 | + * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US" |
|
| 57 | + * @return string Translated string |
|
| 58 | + */ |
|
| 59 | + function aitransplural( $singular, $plural, $number, array $params = array(), $domain = 'client', $locale = null ) |
|
| 60 | + { |
|
| 61 | + $i18n = app( '\Aimeos\Shop\Base\Context' )->get()->getI18n( $locale ); |
|
| 62 | 62 | |
| 63 | - return vsprintf( $i18n->dn( $domain, $singular, $plural, $number ), $params ); |
|
| 64 | - } |
|
| 63 | + return vsprintf( $i18n->dn( $domain, $singular, $plural, $number ), $params ); |
|
| 64 | + } |
|
| 65 | 65 | } |