Commit 6faa5d71ea95395906d48aabc49079a11024b54d
1 parent
33ae1015
Changes regarding relations of fields in a conditional fieldset
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3706 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
13 additions
and
0 deletions
lib/documentmanagement/DocumentField.inc
| @@ -27,6 +27,7 @@ require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentType.inc") | @@ -27,6 +27,7 @@ require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentType.inc") | ||
| 27 | */ | 27 | */ |
| 28 | 28 | ||
| 29 | require_once(KT_LIB_DIR . '/documentmanagement/MetaData.inc'); | 29 | require_once(KT_LIB_DIR . '/documentmanagement/MetaData.inc'); |
| 30 | +require_once(KT_LIB_DIR . '/metadata/metadatautil.inc.php'); | ||
| 30 | 31 | ||
| 31 | class DocumentField extends KTEntity { | 32 | class DocumentField extends KTEntity { |
| 32 | 33 | ||
| @@ -234,6 +235,18 @@ class DocumentField extends KTEntity { | @@ -234,6 +235,18 @@ class DocumentField extends KTEntity { | ||
| 234 | function getValues() { | 235 | function getValues() { |
| 235 | return MetaData::getByDocumentField($this); | 236 | return MetaData::getByDocumentField($this); |
| 236 | } | 237 | } |
| 238 | + | ||
| 239 | + function getParentFieldId() { | ||
| 240 | + return KTMetadataUtil::getParentFieldId($this); | ||
| 241 | + } | ||
| 242 | + | ||
| 243 | + function getChildFieldIds() { | ||
| 244 | + return KTMetadataUtil::getChildFieldIds($this); | ||
| 245 | + } | ||
| 246 | + | ||
| 247 | + function hasChildren() { | ||
| 248 | + return (boolean)KTMetadataUtil::getChildFieldIds($this); | ||
| 249 | + } | ||
| 237 | } | 250 | } |
| 238 | 251 | ||
| 239 | /** | 252 | /** |