@@ 108-115 (lines=8) @@ | ||
105 | */ |
|
106 | public function addStylesDirectly($assets) |
|
107 | { |
|
108 | foreach ((array)$assets as &$item) { |
|
109 | if (!in_array($item, $this->appendedStyles)) { |
|
110 | $this->appendedStyles[$item] = [ |
|
111 | 'src' => $item, |
|
112 | 'attributes' => [], |
|
113 | ]; |
|
114 | } |
|
115 | } |
|
116 | ||
117 | return $this; |
|
118 | } |
|
@@ 129-136 (lines=8) @@ | ||
126 | */ |
|
127 | public function addScriptsDirectly($assets, $location = self::ASSETS_SCRIPT_POSITION_FOOTER) |
|
128 | { |
|
129 | foreach ((array)$assets as &$item) { |
|
130 | if (!in_array($item, $this->appendedScripts[$location])) { |
|
131 | $this->appendedScripts[$location][$item] = [ |
|
132 | 'src' => $item, |
|
133 | 'attributes' => [], |
|
134 | ]; |
|
135 | } |
|
136 | } |
|
137 | ||
138 | return $this; |
|
139 | } |