mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
NEW Install module to the vendor folder
This commit is contained in:
parent
3f02a0b295
commit
fb91acbe3a
@ -10,8 +10,9 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"silverstripe/framework": "^4.0@dev",
|
||||
"silverstripe/cms": "^4.0@dev"
|
||||
"silverstripe/vendor-plugin": "^1.0",
|
||||
"silverstripe/framework": "^4.0",
|
||||
"silverstripe/cms": "^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7",
|
||||
@ -20,7 +21,11 @@
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
}
|
||||
},
|
||||
"expose": [
|
||||
"css",
|
||||
"javascript"
|
||||
]
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -11,7 +11,6 @@ use SilverStripe\ORM\ArrayList;
|
||||
use SilverStripe\ORM\DataObjectInterface;
|
||||
use SilverStripe\Widgets\Forms\WidgetAreaEditor;
|
||||
use SilverStripe\Widgets\Model\Widget;
|
||||
use SilverStripe\View\Requirements;
|
||||
|
||||
/**
|
||||
* Special field type for selecting and configuring widgets on a page.
|
||||
@ -40,9 +39,8 @@ class WidgetAreaEditor extends FormField
|
||||
*/
|
||||
public function FieldHolder($properties = array())
|
||||
{
|
||||
$module = ModuleLoader::getModule('silverstripe/widgets');
|
||||
Requirements::css($module->getRelativeResourcePath('css/WidgetAreaEditor.css'));
|
||||
Requirements::javascript($module->getRelativeResourcePath('javascript/WidgetAreaEditor.js'));
|
||||
Requirements::css('silverstripe/widgets:css/WidgetAreaEditor.css');
|
||||
Requirements::javascript('silverstripe/widgets:javascript/WidgetAreaEditor.js');
|
||||
|
||||
return $this->renderWith(WidgetAreaEditor::class);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user