File tree Expand file tree Collapse file tree 6 files changed +17
-11
lines changed
com.woltlab.wcf/templates
wcfsetup/install/files/lib/system/form/builder/container/wysiwyg Expand file tree Collapse file tree 6 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 88 { if $child -> isAvailable ()}
99 <li data-name =" { $child -> getName ()} " { if ! $child -> checkDependencies ()} hidden{ /if} >
1010 <button type =" button" >
11- { if $child -> getIcon ()} { icon name= $child -> getIcon ()} { /if }
11+ { if $child -> getIcon ()} { unsafe: $child -> getIcon () -> toHtml ()} { /if }
1212 <span >{ @$child -> getLabel ()} </span >
1313 </button >
1414 </li >
Original file line number Diff line number Diff line change 33namespace wcf \system \form \builder \container \wysiwyg ;
44
55use wcf \system \form \builder \container \IFormContainer ;
6+ use wcf \system \style \FontAwesomeIcon ;
67
78/**
89 * Represents a container that is a tab of a wysiwyg tab menu.
@@ -17,7 +18,7 @@ interface IWysiwygTabFormContainer extends IFormContainer
1718 /**
1819 * Gets the icon associated with the tab.
1920 */
20- public function getIcon (): ?string ;
21+ public function getIcon (): ?FontAwesomeIcon ;
2122
2223 /**
2324 * Gets the name associated with the tab.
Original file line number Diff line number Diff line change 1414use wcf \system \form \builder \field \wysiwyg \WysiwygFormField ;
1515use wcf \system \form \builder \IFormChildNode ;
1616use wcf \system \form \builder \TWysiwygFormNode ;
17+ use wcf \system \style \FontAwesomeIcon ;
1718
1819/**
1920 * Represents the whole container with a WYSIWYG editor and the associated tab menu below it with
@@ -505,7 +506,7 @@ public function populate()
505506 ->addClass ('formAttachmentContent ' )
506507 ->label ('wcf.attachment.attachments ' )
507508 ->name ("attachments " )
508- ->icon ('paperclip ' )
509+ ->icon (FontAwesomeIcon:: fromValues ( 'paperclip ' ) )
509510 ->wysiwygId ($ this ->getWysiwygId ())
510511 ->appendChild (
511512 FormContainer::create ($ this ->wysiwygId . 'AttachmentsContainer ' )
@@ -514,14 +515,14 @@ public function populate()
514515
515516 WysiwygTabFormContainer::create ($ this ->wysiwygId . 'SettingsTab ' )
516517 ->label ('wcf.message.settings ' )
517- ->icon ('gear ' )
518+ ->icon (FontAwesomeIcon:: fromValues ( 'gear ' ) )
518519 ->name ('settings ' )
519520 ->wysiwygId ($ this ->getWysiwygId ())
520521 ->appendChild ($ this ->settingsContainer ),
521522
522523 WysiwygTabFormContainer::create ($ this ->wysiwygId . 'PollTab ' )
523524 ->label ('wcf.poll.management ' )
524- ->icon ('chart-bar ' )
525+ ->icon (FontAwesomeIcon:: fromValues ( 'chart-bar ' ) )
525526 ->name ('poll ' )
526527 ->wysiwygId ($ this ->getWysiwygId ())
527528 ->appendChild ($ this ->pollContainer ),
Original file line number Diff line number Diff line change 22
33namespace wcf \system \form \builder \container \wysiwyg ;
44
5+ use wcf \system \style \FontAwesomeIcon ;
6+
57/**
68 * Represents the form container for the quote-related fields below a WYSIWYG editor.
79 *
@@ -16,7 +18,7 @@ class WysiwygQuoteFormContainer extends WysiwygTabFormContainer
1618
1719 public function __construct ()
1820 {
19- $ this ->icon ('quote-left ' )
21+ $ this ->icon (FontAwesomeIcon:: fromValues ( 'quote-left ' ) )
2022 ->name ('quotes ' )
2123 ->label ('wcf.bbcode.quote ' );
2224 }
Original file line number Diff line number Diff line change 88use wcf \system \form \builder \container \TabTabMenuFormContainer ;
99use wcf \system \form \builder \TWysiwygFormNode ;
1010use wcf \system \form \builder \wysiwyg \WysiwygSmileyFormNode ;
11+ use wcf \system \style \FontAwesomeIcon ;
1112use wcf \util \StringUtil ;
1213
1314/**
@@ -78,9 +79,9 @@ public function populate()
7879 }
7980
8081 #[\Override]
81- public function getIcon (): string
82+ public function getIcon (): ? FontAwesomeIcon
8283 {
83- return 'face-smile ' ;
84+ return FontAwesomeIcon:: fromValues ( 'face-smile ' ) ;
8485 }
8586
8687 #[\Override]
Original file line number Diff line number Diff line change 44
55use wcf \system \form \builder \container \TabFormContainer ;
66use wcf \system \form \builder \TWysiwygFormNode ;
7+ use wcf \system \style \FontAwesomeIcon ;
78
89/**
910 * Represents a container that is a tab of a wysiwyg tab menu.
@@ -22,19 +23,19 @@ class WysiwygTabFormContainer extends TabFormContainer implements IWysiwygTabFor
2223 */
2324 protected $ templateName = 'shared_wysiwygTabFormContainer ' ;
2425
25- protected ?string $ icon = null ;
26+ protected ?FontAwesomeIcon $ icon = null ;
2627 protected string $ name = '' ;
2728
2829 #[\Override]
29- public function getIcon (): ?string
30+ public function getIcon (): ?FontAwesomeIcon
3031 {
3132 return $ this ->icon ;
3233 }
3334
3435 /**
3536 * Sets the icon associated with the tab.
3637 */
37- public function icon (?string $ icon ): static
38+ public function icon (?FontAwesomeIcon $ icon ): static
3839 {
3940 $ this ->icon = $ icon ;
4041
You can’t perform that action at this time.
0 commit comments