src/Admin/AdminController.php
public function getPostEditAdmin($id)
    {
        $this->di->get("auth")->isAdmin(true);

        $title      = "Admin - Redigera profil";
        $card       = "Redigera";
        $view       = $this->di->get("view");
        $pageRender = $this->di->get("pageRender");
        $form       = new EditAdminForm($this->di, $id);

        $form->check();

        $data = [
            "form" => $form->getHTML(),
            "card" => $card,
            "title" => $title,
        ];

        $view->add("admin/edit", $data);

        $pageRender->renderPage(["title" => $title]);
    }
public function getPostEditAdmin($id)
    {
        $this->di->get("auth")->isAdmin(true);

        $title      = "Admin - Redigera profil";
        $card       = "Redigera";
        $view       = $this->di->get("view");
        $pageRender = $this->di->get("pageRender");
        $form       = new EditAdminForm($this->di, $id);

        $form->check();

        $data = [
            "form" => $form->getHTML(),
            "card" => $card,
            "title" => $title,
        ];

        $view->add("admin/edit", $data);

        $pageRender->renderPage(["title" => $title]);
    }
public function getPostEditAdmin ( $ id ) { $ this -> di -> get ( "auth" ) -> isAdmin ( true ) ; $ title = "Admin - Redigera profil" ; $ card = "Redigera" ; $ view = $ this -> di -> get ( "view" ) ; $ pageRender = $ this -> di -> get ( "pageRender" ) ; $ form = new EditAdminForm ( $ this -> di , $ id ) ; $ form -> check ( ) ; $ data = [ "form" => $ form -> getHTML ( ) , "card" => $ card , "title" => $ title , ] ; $ view -> add ( "admin/edit" , $ data ) ; $ pageRender -> renderPage ( [ "title" => $ title ] ) ; }
Edit a user as admin.

@return void
Edit a user as admin .