<?php
 namespace VnChocola\Module\SuperAdmin\SpAdminLayout;
 use TCMS\Controller;
 use Model;
 class LayoutController extends Controller {
 public function index() {
 $this->view->addStyle(asset('/style/bootstrap.min.css'), false);
 $this->view->addStyle(asset('/fontawesome-free/css/all.min.css'), false);
 $this->view->addStyle(asset('/style/super-admin-layout/sp-admin-layout.css'));
 $this->view->addScript(asset('/script/jquery.min.js'), false);
 $this->view->addScript(asset('/script/bootstrap.min.js'), false);
 $this->view->addScript(asset('/script/super-admin-layout/sp-admin-layout.js'));
 $userNameLogin = 'Guest';
 $avatar = null;
 $authExtension = load_auth();
 if($authExtension) {
 $userNameLogin = $authExtension->getName();
 $avatar = $authExtension->getUser()->avatar;
 }
 else {
 $avatar = '/elFinder/files/user.png';
 }
 $this->view->layoutUserNameLogin = $userNameLogin;
 $this->view->layoutUserAvatar = $avatar;
 return $this->view();
 }
 }
