Exemple #1
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['speaker' => $mapper->belongsTo($entity, 'OpenCFP\\Domain\\Entity\\User', 'user_id'), 'favorites' => $mapper->hasMany($entity, 'OpenCFP\\Domain\\Entity\\Favorite', 'talk_id')];
 }
Exemple #2
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['speaker' => $mapper->belongsTo($entity, \OpenCFP\Domain\Entity\User::class, 'user_id'), 'favorites' => $mapper->hasMany($entity, \OpenCFP\Domain\Entity\Favorite::class, 'talk_id'), 'comments' => $mapper->hasMany($entity, \OpenCFP\Domain\Entity\TalkComment::class, 'talk_id')->order(['created' => 'ASC']), 'meta' => $mapper->hasMany($entity, \OpenCFP\Domain\Entity\TalkMeta::class, 'talk_id')];
 }
Exemple #3
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talks' => $mapper->hasMany($entity, 'OpenCFP\\Domain\\Entity\\Talk', 'user_id'), 'groups' => $mapper->hasManyThrough($entity, '\\OpenCFP\\Domain\\Entity\\Group', '\\OpenCFP\\Domain\\Entity\\UserGroup', 'group_id', 'user_id')];
 }
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['devices' => $mapper->hasMany($entity, '\\Impl\\ApplicationUserDevices', 'application_user_id')];
 }
Exemple #5
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talks' => $mapper->hasMany($entity, \OpenCFP\Domain\Entity\Talk::class, 'user_id'), 'groups' => $mapper->hasManyThrough($entity, \OpenCFP\Domain\Entity\Group::class, \OpenCFP\Domain\Entity\UserGroup::class, 'group_id', 'user_id'), 'comments' => $mapper->hasMany($entity, \OpenCFP\Domain\Entity\TalkComment::class, 'user_id')];
 }
Exemple #6
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['endpoints' => $mapper->hasMany($entity, \OpenCFP\Domain\OAuth\Endpoint::class, 'client_id')];
 }
Exemple #7
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['tags' => $mapper->hasManyThrough($entity, 'SpotTest\\Entity\\Tag', 'SpotTest\\Entity\\PostTag', 'tag_id', 'post_id'), 'comments' => $mapper->hasMany($entity, 'SpotTest\\Entity\\Post\\Comment', 'post_id')->order(['date_created' => 'ASC']), 'polymorphic_comments' => $mapper->hasMany($entity, 'SpotTest\\Entity\\PolymorphicComment', 'item_id')->where(['item_type' => 'post']), 'author' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\Author', 'author_id')];
 }
Exemple #8
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talks' => $mapper->hasMany($entity, 'OpenCFP\\Entity\\Talk', 'user_id')];
 }
Exemple #9
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'])];
 }