]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controllers/ShaarliController.php
RSS/ATOM feeds: process through Slim controller
[github/shaarli/Shaarli.git] / application / front / controllers / ShaarliController.php
index 2b8285887fa421d130d99347fe8e878b84244dff..0c5d363e0ea594f295cc855f01d6fff795a18acb 100644 (file)
@@ -30,6 +30,20 @@ abstract class ShaarliController
         return $this;
     }
 
+    /**
+     * Assign variables to RainTPL template through the PageBuilder.
+     *
+     * @param mixed $data Values to assign to the template and their keys
+     */
+    protected function assignAllView(array $data): self
+    {
+        foreach ($data as $key => $value) {
+            $this->assignView($key, $value);
+        }
+
+        return $this;
+    }
+
     protected function render(string $template): string
     {
         $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL));