Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SS4 compatibility tweaks #19

Merged
merged 1 commit into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _config/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
Name: externalurlfield
---
SilverStripe\Core\Injector\Injector:
ExternalURL:
class: BurnBright\ExternalURLField\ExternalURL
45 changes: 26 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
{
"name": "burnbright/silverstripe-externalurlfield",
"description": "Provides SilverStripe with a DBField and FormField for handling external URLs.",
"type": "silverstripe-module",
"license": "MIT",
"keywords": ["silverstripe", "url", "link", "form", "field"],
"require": {
"silverstripe/framework": "^4.0@dev",
"jakeasmith/http_build_url": "^1"
},
"name": "burnbright/silverstripe-externalurlfield",
"description": "Provides SilverStripe with a DBField and FormField for handling external URLs.",
"type": "silverstripe-vendormodule",
"license": "MIT",
"keywords": [
"silverstripe",
"url",
"link",
"form",
"field"
],
"require": {
"silverstripe/framework": "^4.0",
"silverstripe/vendor-plugin": "^1.0",
"jakeasmith/http_build_url": "^1"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"extra": {
"installer-name": "externalurlfield"
},
"authors": [
{
"name": "Jeremy Shipman",
"homepage": "https://github.com/jedateach",
"role": "Developer"
}
],
"extra": {
"installer-name": "externalurlfield"
},
"authors": [
{
"name": "Jeremy Shipman",
"homepage": "https://github.com/jedateach",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"BurnBright\\ExternalURLField\\": "src/",
Expand Down
2 changes: 2 additions & 0 deletions src/ExternalURLField.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ public function getAttributes()
/**
* Rebuild url on save
* @param string $url
* @param array|DataObject $data {@see Form::loadDataFrom}
* @return $this
*/
public function setValue($url, $data = NULL)
{
Expand Down