754eabb1fb39b4dfb34e4beee60ee64a727146f9
[Packages/TYPO3.CMS.git] / typo3 / sysext / t3skin / Classes / Slot / IconUtility.php
1 <?php
2 namespace TYPO3\CMS\T3skin\Slot;
3
4 /**
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Slot for IconUtility
19 */
20 class IconUtility {
21
22 static public $flatSpriteIconName = array(
23 't3-icon t3-i-con-status t3-icon-status-warning t3-icon-warning-lock' => 'fa-lock',
24 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-close' => 'fa-close',
25 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-export-csv' => 'fa-download',
26 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-export-t3d' => 'fa-download',
27 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-history-open' => 'fa-history',
28 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-import-t3d' => 'fa-upload',
29 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-info' => 'fa-info-circle',
30 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-move c-inputButton' => 'fa-arrows',
31 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-move' => 'fa-arrows',
32 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-new' => 'fa-plus-square',
33 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-open' => 'fa-pencil',
34 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-select' => 'fa-check-square-o',
35 't3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-view' => 'fa-desktop',
36 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-add' => 'fa-plus-circle',
37 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-copy' => 'fa-copy',
38 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-cut' => 'fa-cut',
39 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-delete' => 'fa-trash',
40 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-download' => 'fa-download',
41 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-hide' => 'fa-circle',
42 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-paste' => 'fa-paste',
43 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-pick-date' => 'fa-calendar',
44 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-rename' => 'fa-quote-right',
45 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-undo' => 'fa-undo',
46 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-unhide' => 'fa-circle-thin',
47 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-upload' => 'fa-upload',
48 't3-icon t3-icon-actions t3-icon-actions-input t3-icon-input-clear' => 'fa-times-circle',
49 't3-icon t3-icon-actions t3-icon-actions-move t3-icon-move-down t3-btn t3-btn-moveoption-down' => 'fa-caret-down',
50 't3-icon t3-icon-actions t3-icon-actions-move t3-icon-move-down' => 'fa-arrow-down',
51 't3-icon t3-icon-actions t3-icon-actions-move t3-icon-move-left' => 'fa-arrow-left',
52 't3-icon t3-icon-actions t3-icon-actions-move t3-icon-move-right' => 'fa-arrow-right',
53 't3-icon t3-icon-actions t3-icon-actions-move t3-icon-move-up t3-btn t3-btn-moveoption-up' => 'fa-caret-up',
54 't3-icon t3-icon-actions t3-icon-actions-move t3-icon-move-up' => 'fa-arrow-up',
55 't3-icon t3-icon-actions t3-icon-actions-page t3-icon-page-move' => 'fa-arrows',
56 't3-icon t3-icon-actions t3-icon-actions-page t3-icon-page-new' => 'fa-plus-square',
57 't3-icon t3-icon-actions t3-icon-actions-page t3-icon-page-open' => 'fa-pencil',
58 't3-icon t3-icon-actions t3-icon-actions-selection t3-icon-selection-delete t3-btn t3-btn-removeoption' => 'fa-times',
59 't3-icon t3-icon-actions t3-icon-actions-selection t3-icon-selection-delete' => 'fa-remove',
60 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-backend-user-emulate' => 'fa-sign-in',
61 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-backend-user-switch' => 'fa-sign-out',
62 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-cache-clear' => 'fa-bolt',
63 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-configure' => 'fa-gear',
64 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-download ' => 'fa-cloud-download',
65 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-download' => 'fa-download',
66 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-install' => 'fa-plus-circle',
67 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-sqldump' => 'fa-database',
68 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-uninstall' => 'fa-minus-square',
69 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-help-open' => 'fa-question-circle',
70 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-refresh' => 'fa-refresh',
71 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-shortcut-new' => 'fa-star',
72 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-tree-search-open' => 'fa-search',
73 't3-icon t3-icon-actions t3-icon-actions-template t3-icon-template-new' => 'fa-plus',
74 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-go-back' => 'fa-angle-double-left',
75 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-go-forward' => 'fa-angle-double-right',
76 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-go-up' => 'fa-level-up',
77 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-paging-first' => 'fa-step-backward',
78 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-paging-last' => 'fa-step-forward',
79 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-paging-next' => 'fa-arrow-right',
80 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-paging-previous' => 'fa-arrow-left',
81 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-table-expand' => 'fa-angle-double-right',
82 't3-icon t3-icon-actions t3-icon-actions-view t3-icon-view-table-collapse' => 'fa-angle-double-left',
83 't3-icon t3-icon-actions t3-icon-actions-window t3-icon-window-open' => 'fa-arrows-alt',
84 't3-icon t3-icon-actions t3-icon-system-extension-import' => 'fa-cloud-download',
85 't3-icon t3-icon-apps t3-icon-apps-toolbar t3-icon-toolbar-menu-actions' => 'fa-cog',
86 't3-icon t3-icon-apps t3-icon-apps-toolbar t3-icon-toolbar-menu-cache' => 'fa-bolt',
87 't3-icon t3-icon-apps t3-icon-apps-toolbar t3-icon-toolbar-menu-opendocs' => 'fa-file',
88 't3-icon t3-icon-apps t3-icon-apps-toolbar t3-icon-toolbar-menu-search' => 'fa-search',
89 't3-icon t3-icon-apps t3-icon-apps-toolbar t3-icon-toolbar-menu-shortcut' => 'fa-star',
90 't3-icon t3-icon-apps t3-icon-apps-toolbar t3-icon-toolbar-menu-workspace' => 'fa-th-large',
91 't3-icon t3-icon-extensions t3-icon-extensions-extensionmanager t3-icon-extensionmanager-update-script' => 'fa-refresh',
92 't3-icon t3-icon-extensions t3-icon-extensions-scheduler t3-icon-scheduler-run-task' => 'fa-play-circle',
93 't3-icon t3-icon-mimetypes t3-icon-mimetypes-pdf t3-icon-pdf' => 'fa-file-pdf-o',
94 't3-icon t3-icon-mimetypes t3-icon-mimetypes-text t3-icon-text-html' => 'fa-file-text-o',
95 't3-icon t3-icon-mimetypes t3-icon-mimetypes-word t3-icon-word' => 'fa-file-world-o',
96 't3-icon t3-icon-mimetypes t3-icon-mimetypes-x t3-icon-x-sys_language' => 'fa-globe',
97 't3-icon t3-icon-status t3-icon-status-dialog t3-icon-dialog-error' => 'fa-exclamation-triangle',
98 't3-icon t3-icon-status t3-icon-status-dialog t3-icon-dialog-information' => 'fa-info-circle',
99 't3-icon t3-icon-status t3-icon-status-status t3-icon-status-locked' => 'fa-lock',
100 't3-icon t3-icon-status t3-icon-status-status t3-icon-status-permission-denied' => 'fa-minus-square',
101 't3-icon t3-icon-status t3-icon-status-status t3-icon-status-permission-granted' => 'fa-check-circle-o',
102 't3-icon t3-icon-status t3-icon-status-status t3-icon-status-readonly' => 'fa-lock',
103 't3-icon t3-icon-status t3-icon-status-warning t3-icon-warning-lock' => 'fa-lock'
104 );
105
106 /**
107 * Hook to manipulate IconUtility html output code
108 *
109 * @param array $tagAttributes
110 * @param null $innerHtml
111 * @param null $tagName
112 * @return array
113 */
114 public function buildSpriteHtmlIconTag(array $tagAttributes, $innerHtml, $tagName) {
115 $class = self::$flatSpriteIconName[$tagAttributes['class']];
116 if ($class) {
117 $tagAttributes['class'] = 't3-icon fa ' . $class;
118 }
119
120 return array($tagAttributes, $innerHtml, $tagName);
121 }
122
123 }