Skip to content

Commit

Permalink
Merge pull request #83 from sanderha/fix-missing-can-create-methods-s…
Browse files Browse the repository at this point in the history
…tringtagfield

added missing cancreate methods and property to StringTagField.
  • Loading branch information
dhensby authored Aug 22, 2016
2 parents 35773d4 + f6a5698 commit 00c950e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions code/StringTagField.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ class StringTagField extends DropdownField
*/
protected $lazyLoadItemLimit = 10;

/**
* @var bool
*/
protected $canCreate = true;

/**
* @var null|DataObject
*/
Expand Down Expand Up @@ -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;
}
}

0 comments on commit 00c950e

Please sign in to comment.