浏览代码

Add shimming

mscherer 1 年之前
父节点
当前提交
30a5ba40a6
共有 3 个文件被更改,包括 18 次插入0 次删除
  1. 6 0
      src/View/Icon/FontAwesome4Icon.php
  2. 6 0
      src/View/Icon/FontAwesome5Icon.php
  3. 6 0
      src/View/Icon/FontAwesome6Icon.php

+ 6 - 0
src/View/Icon/FontAwesome4Icon.php

@@ -38,6 +38,12 @@ class FontAwesome4Icon extends AbstractIcon {
 			$attributes += $this->config['attributes'];
 			$attributes += $this->config['attributes'];
 		}
 		}
 
 
+		// Shimming
+		if (isset($options['title'])) {
+			$attributes['title'] = $options['title'];
+            unset($options['title']);
+		}
+
 		$namespace = 'fa';
 		$namespace = 'fa';
 
 
 		$class = [
 		$class = [

+ 6 - 0
src/View/Icon/FontAwesome5Icon.php

@@ -39,6 +39,12 @@ class FontAwesome5Icon extends AbstractIcon {
 			$attributes += $this->config['attributes'];
 			$attributes += $this->config['attributes'];
 		}
 		}
 
 
+		// Shimming
+		if (isset($options['title'])) {
+			$attributes['title'] = $options['title'];
+			unset($options['title']);
+		}
+
 		$class = [
 		$class = [
 			$this->config['namespace'],
 			$this->config['namespace'],
 		];
 		];

+ 6 - 0
src/View/Icon/FontAwesome6Icon.php

@@ -39,6 +39,12 @@ class FontAwesome6Icon extends AbstractIcon {
 			$attributes += $this->config['attributes'];
 			$attributes += $this->config['attributes'];
 		}
 		}
 
 
+		// Shimming
+		if (isset($options['title'])) {
+			$attributes['title'] = $options['title'];
+			unset($options['title']);
+		}
+
 		$namespace = 'fa-' . $this->config['namespace'];
 		$namespace = 'fa-' . $this->config['namespace'];
 
 
 		$class = [
 		$class = [