| @@ 114-121 (lines=8) @@ | ||
| 111 | * |
|
| 112 | * @return $this |
|
| 113 | */ |
|
| 114 | public function addCallback($callback, $data = [], $region = "main", $sort = 0) |
|
| 115 | { |
|
| 116 | $view = new View(); |
|
| 117 | $view->set(["callback" => $callback], $data, $sort, "callback"); |
|
| 118 | $this->views[$region][] = $view; |
|
| 119 | ||
| 120 | return $this; |
|
| 121 | } |
|
| 122 | ||
| 123 | ||
| 124 | ||
| @@ 134-141 (lines=8) @@ | ||
| 131 | * |
|
| 132 | * @return $this |
|
| 133 | */ |
|
| 134 | public function addString($content, $region = "main", $sort = 0) |
|
| 135 | { |
|
| 136 | $view = new View(); |
|
| 137 | $view->set($content, [], $sort, "string"); |
|
| 138 | $this->views[$region][] = $view; |
|
| 139 | ||
| 140 | return $this; |
|
| 141 | } |
|
| 142 | ||
| 143 | ||
| 144 | ||
| @@ 146-153 (lines=8) @@ | ||
| 143 | * |
|
| 144 | * @return $this |
|
| 145 | */ |
|
| 146 | public function addCallback($callback, $data = [], $region = "main", $sort = 0) |
|
| 147 | { |
|
| 148 | $view = new View(); |
|
| 149 | $view->set(["callback" => $callback], $data, $sort, "callback"); |
|
| 150 | $this->views[$region][] = $view; |
|
| 151 | ||
| 152 | return $this; |
|
| 153 | } |
|
| 154 | ||
| 155 | ||
| 156 | ||
| @@ 166-173 (lines=8) @@ | ||
| 163 | * |
|
| 164 | * @return $this |
|
| 165 | */ |
|
| 166 | public function addString($content, $region = "main", $sort = 0) |
|
| 167 | { |
|
| 168 | $view = new View(); |
|
| 169 | $view->set($content, [], $sort, "string"); |
|
| 170 | $this->views[$region][] = $view; |
|
| 171 | ||
| 172 | return $this; |
|
| 173 | } |
|
| 174 | ||
| 175 | ||
| 176 | ||