File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
wcfsetup/install/files/lib/data/contact/option Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 44
55use wcf \data \AbstractDatabaseObjectAction ;
66use wcf \data \ISortableAction ;
7+ use wcf \data \TI18nDatabaseObjectAction ;
78use wcf \system \exception \UserInputException ;
89use wcf \system \WCF ;
910
1920 */
2021class ContactOptionAction extends AbstractDatabaseObjectAction implements ISortableAction
2122{
23+ use TI18nDatabaseObjectAction;
24+
2225 /**
2326 * @inheritDoc
2427 */
@@ -82,4 +85,55 @@ public function updatePosition()
8285 }
8386 WCF ::getDB ()->commitTransaction ();
8487 }
88+
89+ #[\Override]
90+ public function create ()
91+ {
92+ $ option = parent ::create ();
93+
94+ $ this ->saveI18nValue ($ option );
95+
96+ return $ option ;
97+ }
98+
99+ #[\Override]
100+ public function delete ()
101+ {
102+ $ result = parent ::delete ();
103+
104+ $ this ->deleteI18nValues ();
105+
106+ return $ result ;
107+ }
108+
109+ #[\Override]
110+ public function update ()
111+ {
112+ parent ::update ();
113+
114+ foreach ($ this ->objects as $ editor ) {
115+ $ this ->saveI18nValue ($ editor ->getDecoratedObject ());
116+ }
117+ }
118+
119+ #[\Override]
120+ public function getI18nSaveTypes (): array
121+ {
122+ return [
123+ 'optionTitle ' => 'wcf.contact.option\d+ ' ,
124+ 'optionDescription ' => 'wcf.contact.optionDescription\d+ ' ,
125+ ];
126+ }
127+
128+ #[\Override]
129+ public function getLanguageCategory (): string
130+ {
131+ return 'wcf.contact ' ;
132+ }
133+
134+ #[\Override]
135+ public function getPackageID (): int
136+ {
137+ return 1 ;
138+ }
85139}
You can’t perform that action at this time.
0 commit comments