From 826cafb4769dbf419a5989a9ccddac74bc01bc23 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 24 Jul 2015 10:54:11 +0200 Subject: [PATCH] SyncRule: add helper method fetching properties --- library/Director/Objects/SyncRule.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/Director/Objects/SyncRule.php b/library/Director/Objects/SyncRule.php index a96d5d1c..d2a59f3b 100644 --- a/library/Director/Objects/SyncRule.php +++ b/library/Director/Objects/SyncRule.php @@ -21,6 +21,17 @@ class SyncRule extends DbObject 'filter_expression' => null, ); + public function fetchSyncProperties() + { + $db = $this->getDb(); + return SyncProperty::loadAll( + $this->getConnection(), + $db->select()->from('sync_property')->where('rule_id = ?', $this->id) + ); + + return $this->syncProperties; + } + /** protected $properties = array();