mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 09:05:32 +00:00
ENH Add generic types (#277)
This commit is contained in:
parent
0e3d8ca632
commit
556772b7be
@ -219,7 +219,7 @@ class StringTagField extends DropdownField
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ArrayList
|
||||
* @return ArrayList<ArrayData>
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
@ -356,7 +356,6 @@ class StringTagField extends DropdownField
|
||||
{
|
||||
$items = [];
|
||||
foreach ($this->getOptions() as $i => $tag) {
|
||||
/** @var ArrayData $tag */
|
||||
$tagValue = $tag->Value;
|
||||
// Map into a distinct list (prevent duplicates)
|
||||
if (stripos($tagValue ?? '', $term ?? '') !== false && !array_key_exists($tagValue, $items ?? [])) {
|
||||
|
@ -257,7 +257,7 @@ class TagField extends MultiSelectField
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ArrayList
|
||||
* @return ArrayList<ArrayData>
|
||||
*/
|
||||
protected function getOptions($onlySelected = false)
|
||||
{
|
||||
@ -582,7 +582,6 @@ class TagField extends MultiSelectField
|
||||
*/
|
||||
public function performReadonlyTransformation()
|
||||
{
|
||||
/** @var ReadonlyTagField $copy */
|
||||
$copy = $this->castedCopy(ReadonlyTagField::class);
|
||||
$copy->setSourceList($this->getSourceList());
|
||||
$copy->setTitleField($this->getTitleField());
|
||||
|
Loading…
x
Reference in New Issue
Block a user