From bb2b79e959713a0ff46985424f1b886422b2170c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 30 Sep 2009 22:19:25 +0000 Subject: [PATCH] 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 --- core/model/ComponentSet.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/core/model/ComponentSet.php b/core/model/ComponentSet.php index bc6833dd5..8b30b14e2 100755 --- a/core/model/ComponentSet.php +++ b/core/model/ComponentSet.php @@ -60,6 +60,30 @@ class ComponentSet extends DataObjectSet { $this->joinField = $joinField; } + /** + * Get the ComponentSet specific information + * + * Returns an array on the format array( + * 'type' => , + * 'ownerObj' => , + * 'ownerClass' => , + * 'tableName' => , + * 'childClass' => , + * 'joinField' => |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.