We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
7 | trait HasTranslations |
||
8 | { |
||
9 | use OriginalHasTranslations; |
||
10 | |||
11 | /** |
||
12 | * @var bool |
||
13 | */ |
||
14 | public $locale = false; |
||
15 | |||
16 | |||
17 | /** |
||
18 | * Get the attributes that were casted in the model. |
||
19 | * Used for translations because Spatie/Laravel-Translatable |
||
20 | * overwrites the getCasts() method. |
||
21 | * |
||
22 | * @return [type] [description] |
||
|
|||
23 | */ |
||
24 | public function getCastedAttributes() : array |
||
28 | |||
29 | /* |
||
30 | |-------------------------------------------------------------------------- |
||
31 | | SPATIE/LARAVEL-TRANSLATABLE OVERWRITES |
||
32 | |-------------------------------------------------------------------------- |
||
33 | */ |
||
34 | |||
35 | /** |
||
36 | * Use the forced locale if present. |
||
37 | * |
||
38 | * @param string $key |
||
39 | * @return mixed |
||
40 | */ |
||
41 | public function getAttributeValue($key) |
||
51 | |||
52 | /* |
||
53 | |-------------------------------------------------------------------------- |
||
54 | | ELOQUENT OVERWRITES |
||
55 | |-------------------------------------------------------------------------- |
||
56 | */ |
||
57 | |||
58 | /** |
||
59 | * Create translated items as json. |
||
60 | * |
||
61 | * @param array $attributes |
||
62 | * @return static |
||
63 | */ |
||
64 | public static function create(array $attributes = []) |
||
83 | |||
84 | /** |
||
85 | * Update translated items as json. |
||
86 | * |
||
87 | * @param array $attributes |
||
88 | * @param array $options |
||
89 | * @return bool |
||
90 | */ |
||
91 | public function update(array $attributes = [], array $options = []) |
||
111 | |||
112 | /* |
||
113 | |-------------------------------------------------------------------------- |
||
114 | | CUSTOM METHODS |
||
115 | |-------------------------------------------------------------------------- |
||
116 | */ |
||
117 | |||
118 | /** |
||
119 | * Check if a model is translatable, by the adapter's standards. |
||
120 | * |
||
121 | * @return bool |
||
122 | */ |
||
123 | public function translationEnabledForModel() |
||
127 | |||
128 | /** |
||
129 | * Get all locales the admin is allowed to use. |
||
130 | * |
||
131 | * @return array |
||
132 | */ |
||
133 | public function getAvailableLocales() |
||
137 | |||
138 | /** |
||
139 | * Set the locale property. Used in normalizeLocale() to force the translation |
||
140 | * to a different language that the one set in app()->getLocale();. |
||
141 | * |
||
142 | * @param string |
||
143 | */ |
||
144 | public function setLocale($locale) |
||
148 | |||
149 | /** |
||
150 | * Get the locale property. Used in SpatieTranslatableSluggableService |
||
151 | * to save the slug for the appropriate language. |
||
152 | * |
||
153 | * @param string |
||
154 | */ |
||
155 | public function getLocale() |
||
163 | |||
164 | /** |
||
165 | * Magic method to get the db entries already translated in the wanted locale. |
||
166 | * |
||
167 | * @param string $method |
||
168 | * @param array $parameters |
||
169 | * @return |
||
170 | */ |
||
171 | public function __call($method, $parameters) |
||
202 | } |
||
203 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.