mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
e603bb8915
commit
bb2b79e959
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user