Commit 953a339dcbeef6a376f51f59afda8b930cc5b444
1 parent
16b6a50f
Add some helper selectors - getList and getByDocument
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3526 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
11 additions
and
0 deletions
lib/documentmanagement/DocumentFieldLink.inc
| ... | ... | @@ -155,5 +155,16 @@ class DocumentFieldLink extends KTEntity { |
| 155 | 155 | $_SESSION["errorMessage"] = $lang_err_object_not_exist . "id = " . $iDocumentID . " table = $default->document_fields_link_table"; |
| 156 | 156 | return false; |
| 157 | 157 | } |
| 158 | + | |
| 159 | + function &getList($sWhereClause = null) { | |
| 160 | + return KTEntityUtil::getList2('DocumentFieldLink', $sWhereClause); | |
| 161 | + } | |
| 162 | + | |
| 163 | + | |
| 164 | + function &getByDocument($oDocument) { | |
| 165 | + return KTEntityUtil::getByDict('DocumentFieldLink', array( | |
| 166 | + 'document_id' => $oDocument->getID(), | |
| 167 | + ), array('multi' => true)); | |
| 168 | + } | |
| 158 | 169 | } |
| 159 | 170 | ?> | ... | ... |