API Add method to get foreign class key on polymorphic has_many

This commit is contained in:
Guy Sartorelli 2022-05-02 18:23:36 +12:00
parent 6ced576b2f
commit 2836478c72

View File

@ -29,6 +29,14 @@ class PolymorphicHasManyList extends HasManyList
return $this->dataQuery->getQueryParam('Foreign.Class'); return $this->dataQuery->getQueryParam('Foreign.Class');
} }
/**
* Gets the field name which holds the related object class.
*/
public function getForeignClassKey(): string
{
return $this->classForeignKey;
}
/** /**
* Create a new PolymorphicHasManyList relation list. * Create a new PolymorphicHasManyList relation list.
* *