File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,18 +45,12 @@ class ExtraFieldOptions
4545 #[Gedmo \Locale]
4646 private ?string $ locale = null ;
4747
48- /**
49- * @return int
50- */
51- public function getId ()
48+ public function getId (): ?int
5249 {
5350 return $ this ->id ;
5451 }
5552
56- /**
57- * @return int
58- */
59- public function getOptionOrder ()
53+ public function getOptionOrder (): ?int
6054 {
6155 return $ this ->optionOrder ;
6256 }
@@ -80,10 +74,7 @@ public function setField(ExtraField $field): self
8074 return $ this ;
8175 }
8276
83- /**
84- * @return string
85- */
86- public function getValue ()
77+ public function getValue (): ?string
8778 {
8879 return $ this ->value ;
8980 }
@@ -131,6 +122,18 @@ public function setPriorityMessage(string $priorityMessage): self
131122 return $ this ;
132123 }
133124
125+ /**
126+ * Backward-compatibility alias for legacy code calling setLocale().
127+ * Gedmo Translatable expects the locale to be injected through the "Locale" field.
128+ */
129+ public function setLocale (string $ locale ): self
130+ {
131+ return $ this ->setTranslatableLocale ($ locale );
132+ }
133+
134+ /**
135+ * Sets the locale used by Gedmo Translatable for this entity.
136+ */
134137 public function setTranslatableLocale (string $ locale ): self
135138 {
136139 $ this ->locale = $ locale ;
You can’t perform that action at this time.
0 commit comments