diff --git a/code/Icon.php b/code/Icon.php
index 46b8d49..fb84a02 100755
--- a/code/Icon.php
+++ b/code/Icon.php
@@ -1,14 +1,20 @@
tableName, $this->name, 'Varchar(1024)');
}
+
+ public function wrapSvg() {
+ return true;
+ }
private static $casting = array(
'URL' => 'HTMLFragment',
@@ -84,7 +90,16 @@ public function SVG(){
}
$svg = file_get_contents($filePath);
- return ''.$svg.'';
+
+
+ $wrapSVG = $this->wrapSvg();
+ $this->extend('updateWrapSVG', $wrapSVG);
+
+ if($wrapSVG){
+ $svg =''.$svg.'';
+ }
+
+ return $svg;
}
/**
@@ -94,4 +109,4 @@ public function SVG(){
public function scaffoldFormField($title = null, $params = null) {
return IconField::create($this->name, $title);
}
-}
\ No newline at end of file
+}
diff --git a/composer.json b/composer.json
index 873e9d8..5e882ef 100755
--- a/composer.json
+++ b/composer.json
@@ -1,5 +1,5 @@
{
- "name": "jaedb/iconfield",
+ "name": "toastnz/iconfield",
"type": "silverstripe-vendormodule",
"description": "Icon field for SilverStripe",
"homepage": "http://jamesbarnsley.co.nz",