Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Bee-color framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jordan Breton
Bee-color framework
Commits
b5dc6f7d
Commit
b5dc6f7d
authored
Sep 02, 2019
by
Jordan Breton
✏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added svg importer to base SiteLayout
parent
b7ad61fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
7 deletions
+34
-7
engine/core/view/SiteLayout.php
engine/core/view/SiteLayout.php
+34
-7
No files found.
engine/core/view/SiteLayout.php
View file @
b5dc6f7d
...
...
@@ -9,6 +9,7 @@ use wfw\engine\core\router\IRouter;
use
wfw\engine\core\session\ISession
;
use
wfw\engine\lib\HTML\resources\css\ICSSManager
;
use
wfw\engine\lib\HTML\resources\js\IJsScriptManager
;
use
wfw\engine\lib\HTML\resources\SvgImporter
;
use
wfw\engine\package\general\lib\JsApiHelper
;
use
wfw\engine\package\users\domain\types\Admin
;
...
...
@@ -16,6 +17,7 @@ use wfw\engine\package\users\domain\types\Admin;
* Default site layout that can be extended.
*/
class
SiteLayout
extends
Layout
{
private
$_svg
;
/** @var IConf $_conf */
private
$_conf
;
/** @var ICacheSystem $_cache */
...
...
@@ -59,6 +61,11 @@ class SiteLayout extends Layout {
$conf
->
getString
(
"server/framework/version"
)
.
"-app-"
.
(
$conf
->
getString
(
"app/version"
)
??
'0.0'
)
));
$this
->
_svg
=
new
SvgImporter
(
dirname
(
__DIR__
,
3
)
.
"/site/package/web/webroot/Image/svg"
,
$cache
);
$this
->
_conf
=
$conf
;
$this
->
_cache
=
$cache
;
$this
->
_router
=
$router
;
...
...
@@ -84,35 +91,55 @@ class SiteLayout extends Layout {
/**
* @return mixed
*/
public
function
getConf
()
{
public
function
getConf
()
:
IConf
{
return
$this
->
_conf
;
}
/**
* @return SvgImporter
*/
public
function
getSvg
():
SvgImporter
{
return
$this
->
_svg
;
}
/**
* @param string $name
* @param string $package
* @return string
*/
public
function
svgImport
(
string
$name
,
string
$package
=
"web"
):
string
{
return
$this
->
_svg
->
import
(
dirname
(
__DIR__
,
3
)
.
"/site/package/
$package
/webroot/Image/svg/
$name
"
,
true
);
}
/**
* @return mixed
*/
public
function
getRouter
()
{
public
function
getRouter
()
:
IRouter
{
return
$this
->
_router
;
}
/**
* @return mixed
*/
public
function
getSession
()
{
public
function
getSession
()
:
ISession
{
return
$this
->
_session
;
}
/**
* @return
mixed
* @return
ICacheSystem
*/
public
function
getCache
()
{
public
function
getCache
()
:
ICacheSystem
{
return
$this
->
_cache
;
}
/**
* @return
mixed
* @return
INotifier
*/
public
function
getNotifier
()
{
public
function
getNotifier
()
:
INotifier
{
return
$this
->
_notifier
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment