Skip to content

Commit

Permalink
bump version in composer.json, adjust README to specifically include …
Browse files Browse the repository at this point in the history
…version 5
  • Loading branch information
Kevin Gröger committed May 11, 2023
1 parent 69daa25 commit 0ffe9c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Plugin.

## Requirements

SilverStripe Framework v4+
SilverStripe Framework v4+ and v5+

For a Version that is compatible to SilverStripe 3+, consider using the [3.0 release](https://github.com/tractorcow/silverstripe-colorpicker/releases/tag/3.0.0)

Expand All @@ -27,7 +27,7 @@ private static $db = [
];
```

Alternatively, you can also use the fully qualified classname.
Alternatively, you can also use the fully qualified classname.
The best way to do this is to import the class at the top of your PHP file, like so:

use TractorCow\Colorpicker\Color;
Expand All @@ -51,7 +51,7 @@ public function getCMSFields()
$fields = parent::getCMSFields();

$fields->addFieldToTab(
'Root.Main',
'Root.Main',
ColorField::create('BgColor', 'Background color')
);

Expand All @@ -61,7 +61,7 @@ public function getCMSFields()

### Tips for using the Color fieldtype in templates

The `TractorCow\Colorpicker\Color` fieldtype provides some helper methods that can be useful in templating.
The `TractorCow\Colorpicker\Color` fieldtype provides some helper methods that can be useful in templating.
Let's consider the above scenario where you have a Field named 'BgColor'. The most common use-case is something like this:

```html
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"issues": "https://github.com/tractorcow/silverstripe-colorpicker/issues"
},
"require": {
"silverstripe/framework": "^4.0"
"silverstripe/framework": "^4.0 || ^5.0"
},
"extra": {
"branch-alias": {
Expand Down

0 comments on commit 0ffe9c6

Please # to comment.