Example #1
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['users' => $mapper->hasManyThrough($entity, 'OpenCFP\\Domain\\Entity\\User', 'OpenCFP\\Domain\\Entity\\UserGroup', 'user_id', 'group_id')];
 }
Example #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')];
 }
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['devices' => $mapper->hasMany($entity, '\\Impl\\ApplicationUserDevices', 'application_user_id')];
 }
Example #4
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')];
 }
Example #5
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'), 'comments' => $mapper->hasMany($entity, 'OpenCFP\\Domain\\Entity\\TalkComment', 'user_id')];
 }
Example #6
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['event' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\Event', 'event_id')];
 }
Example #7
0
 public static function relations(Mapper $mapper, Entity $entity)
 {
     return ['employee' => $mapper->belongsTo($entity, 'Spark\\Project\\Domain\\Entity\\User', 'employee_id'), 'manager' => $mapper->belongsTo($entity, 'Spark\\Project\\Domain\\Entity\\User', 'manager_id')];
 }
Example #8
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['posts' => $mapper->hasManyThrough($entity, 'SpotTest\\Entity\\Post', 'SpotTest\\Entity\\PostTag', 'tag_id', 'post_id')];
 }
Example #9
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')];
 }
Example #10
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talk' => $mapper->belongsTo($entity, \OpenCFP\Domain\Entity\Talk::class, 'talk_id'), 'user' => $mapper->belongsTo($entity, \OpenCFP\Domain\Entity\User::class, 'user_id')];
 }
Example #11
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talks' => $mapper->hasMany($entity, 'OpenCFP\\Entity\\Talk', 'user_id')];
 }
Example #12
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['user' => $mapper->belongsTo($entity, 'OpenCFP\\Entity\\User', 'user_id')];
 }
Example #13
0
 public static function relations(Mapper $mapper, Entity $entity)
 {
     return ['rol' => $mapper->belongsTo($entity, Rol::class, 'rol_id')];
 }
Example #14
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['post' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\Post', 'post_id'), 'tag' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\Tag', 'tag_id')];
 }
Example #15
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['endpoints' => $mapper->hasMany($entity, \OpenCFP\Domain\OAuth\Endpoint::class, 'client_id')];
 }
Example #16
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talk' => $mapper->belongsTo($entity, 'OpenCFP\\Domain\\Entity\\Talk', 'talk_id')];
 }
Example #17
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')];
 }
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['item' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\' . ucwords($entity->item_type), 'item_id')];
 }
Example #19
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'])];
 }