Exemple #1
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talk' => $mapper->hasOne($entity, 'OpenCFP\\Entity\\Talk', 'talk_id')];
 }
Exemple #2
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['search' => $mapper->hasOne($entity, 'SpotTest\\Entity\\Event\\Search', 'event_id'), 'polymorphic_comments' => $mapper->hasMany($entity, 'SpotTest\\Entity\\PolymorphicComment', 'item_id')->where(['item_type' => 'event'])];
 }