From 0ffe9c6f2e3cd017f816eaf1cf809ca05f1bb138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Gr=C3=B6ger?= Date: Thu, 11 May 2023 13:07:14 +0200 Subject: [PATCH] bump version in composer.json, adjust README to specifically include version 5 --- README.md | 8 ++++---- composer.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c05d2f8..5baa54a 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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; @@ -51,7 +51,7 @@ public function getCMSFields() $fields = parent::getCMSFields(); $fields->addFieldToTab( - 'Root.Main', + 'Root.Main', ColorField::create('BgColor', 'Background color') ); @@ -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 diff --git a/composer.json b/composer.json index 2ae5001..ed01291 100644 --- a/composer.json +++ b/composer.json @@ -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": {