Add a getter for the HasManyList foreign key.

This commit is contained in:
Andrew Short 2013-09-27 15:06:55 +10:00
parent 1a4b812cbb
commit 43fab1088a

View File

@ -26,6 +26,15 @@ 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();