mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Add a getter for the HasManyList foreign key.
This commit is contained in:
parent
1a4b812cbb
commit
43fab1088a
@ -25,7 +25,16 @@ class HasManyList extends RelationList {
|
||||
|
||||
$this->foreignKey = $foreignKey;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the field name which holds the related object ID.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getForeignKey() {
|
||||
return $this->foreignKey;
|
||||
}
|
||||
|
||||
protected function foreignIDFilter($id = null) {
|
||||
if ($id === null) $id = $this->getForeignID();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user