diff --git a/src/TagField.php b/src/TagField.php index 3968c3f..986ed4e 100644 --- a/src/TagField.php +++ b/src/TagField.php @@ -312,6 +312,21 @@ class TagField extends DropdownField return parent::setValue(array_filter($value)); } + /** + * Gets the source array if required + * + * Note: this is expensive for a SS_List + * + * @return array + */ + public function getSource() + { + if (is_null($this->source)) { + $this->setSource($this->getSourceList()); + } + return $this->source; + } + /** * {@inheritdoc} */