Beispiel #1
0
 public static function addAssignment(Feature $fe, FeatureCategory $fc, FeatureDetail $fd, $mixed)
 {
     $db = Database::connection();
     $db->Execute('insert into FeatureAssignments (fcID, feID, fdObject) values (?, ?, ?)', array($fc->getFeatureCategoryID(), $fe->getFeatureID(), serialize($fd)));
     // sometimes feature detail objects need to do more with the feature assignments, so we do that here.
     $fa = static::getByID($db->Insert_ID(), $mixed);
     $fd->handleFeatureAssignment($fa);
     return $fa;
 }
Beispiel #2
0
 public function addFeature(Feature $fe)
 {
     $db = Loader::db();
     $db->Replace('CollectionVersionFeatures', array('cID' => $this->getCollectionID(), 'cvID' => $this->getVersionID(), 'feID' => $fe->getFeatureID()), array('cID', 'cvID', 'feID'), true);
 }