feat(themes): add ViewThemes library to set views in root themes folder

app, admin, install and authentication views are now located in root themes/ folder
This commit is contained in:
Yassine Doghri 2021-09-02 16:34:25 +00:00
commit 7a276764e6
155 changed files with 356 additions and 178 deletions

View file

@ -8,6 +8,7 @@ use CodeIgniter\Controller;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use ViewThemes\Theme;
/**
* Class BaseController
@ -20,14 +21,6 @@ use Psr\Log\LoggerInterface;
class BaseController extends Controller
{
/**
* An array of helpers to be loaded automatically upon class instantiation. These helpers will be available to all
* other controllers that extend BaseController.
*
* @var string[]
*/
protected $helpers = ['auth', 'breadcrumb', 'svg', 'components', 'misc'];
/**
* Constructor.
*/
@ -36,7 +29,11 @@ class BaseController extends Controller
ResponseInterface $response,
LoggerInterface $logger
): void {
$this->helpers = array_merge($this->helpers, ['auth', 'breadcrumb', 'svg', 'components', 'misc']);
// Do Not Edit This Line
parent::initController($request, $response, $logger);
Theme::setTheme('admin');
}
}