Exemple #1
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talk' => $mapper->belongsTo($entity, 'OpenCFP\\Domain\\Entity\\Talk', 'talk_id')];
 }
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['item' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\' . ucwords($entity->item_type), 'item_id')];
 }
Exemple #3
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 #4
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')];
 }
Exemple #5
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['event' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\Event', 'event_id')];
 }
Exemple #6
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')];
 }
 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')];
 }
Exemple #8
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')];
 }
Exemple #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')];
 }
Exemple #10
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['user' => $mapper->belongsTo($entity, 'OpenCFP\\Entity\\User', 'user_id')];
 }
 public static function relations(Mapper $mapper, Entity $entity)
 {
     return ['rol' => $mapper->belongsTo($entity, Rol::class, 'rol_id')];
 }