ENHANCEMENT Added ComponentSet->getComponentInfo() (#4587, thanks rorschach)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87777 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-09-30 22:19:25 +00:00
parent e603bb8915
commit bb2b79e959

View File

@ -60,6 +60,30 @@ class ComponentSet extends DataObjectSet {
$this->joinField = $joinField;
}
/**
* Get the ComponentSet specific information
*
* Returns an array on the format array(
* 'type' => <string>,
* 'ownerObj' => <Object>,
* 'ownerClass' => <string>,
* 'tableName' => <string>,
* 'childClass' => <string>,
* 'joinField' => <string>|null );
*
* @return array
*/
public function getComponentInfo() {
return array(
'type' => $this->type,
'ownerObj' => $this->ownerObj,
'ownerClass' => $this->ownerClass,
'tableName' => $this->tableName,
'childClass' => $this->childClass,
'joinField' => $this->joinField
);
}
/**
* Get an array of all the IDs in this component set, where the keys are the same as the
* values.