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