diff --git a/code/StringTagField.php b/code/StringTagField.php index 33f5ff0..83a0292 100644 --- a/code/StringTagField.php +++ b/code/StringTagField.php @@ -28,6 +28,11 @@ class StringTagField extends DropdownField */ protected $lazyLoadItemLimit = 10; + /** + * @var bool + */ + protected $canCreate = true; + /** * @var null|DataObject */ @@ -343,4 +348,24 @@ public function validate($validator) { return true; } + + /** + * @return bool + */ + public function getCanCreate() + { + return $this->canCreate; + } + + /** + * @param bool $canCreate + * + * @return static + */ + public function setCanCreate($canCreate) + { + $this->canCreate = $canCreate; + + return $this; + } }