| @@ 108-120 (lines=13) @@ | ||
| 105 | * @return $this |
|
| 106 | * @author Sang Nguyen |
|
| 107 | */ |
|
| 108 | public function addStylesheetsDirectly($assets) |
|
| 109 | { |
|
| 110 | if (!is_array($assets)) { |
|
| 111 | $assets = func_get_args(); |
|
| 112 | } |
|
| 113 | foreach ($assets as &$item) { |
|
| 114 | $item = $item . $this->build; |
|
| 115 | if (!in_array($item, $this->appendedCss)) { |
|
| 116 | $this->appendedCss[] = ['src' => $item, 'attributes' => []]; |
|
| 117 | } |
|
| 118 | } |
|
| 119 | return $this; |
|
| 120 | } |
|
| 121 | ||
| 122 | /** |
|
| 123 | * @param $assets |
|
| @@ 128-141 (lines=14) @@ | ||
| 125 | * @return $this |
|
| 126 | * @author Sang Nguyen |
|
| 127 | */ |
|
| 128 | public function addJavascriptDirectly($assets, $location = 'bottom') |
|
| 129 | { |
|
| 130 | if (!is_array($assets)) { |
|
| 131 | $assets = func_get_args(); |
|
| 132 | } |
|
| 133 | ||
| 134 | foreach ($assets as &$item) { |
|
| 135 | $item = $item . $this->build; |
|
| 136 | if (!in_array($item, $this->appendedJs[$location])) { |
|
| 137 | $this->appendedJs[$location][] = ['src' => $item, 'attributes' => []]; |
|
| 138 | } |
|
| 139 | } |
|
| 140 | return $this; |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * Remove Css to current module |
|