コード例 #1
0
ファイル: Group.php プロジェクト: cloudtracer/opencfp
 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')];
 }
コード例 #2
0
ファイル: Talk.php プロジェクト: jaredfaris/opencfp
 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')];
 }
コード例 #3
0
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['devices' => $mapper->hasMany($entity, '\\Impl\\ApplicationUserDevices', 'application_user_id')];
 }
コード例 #4
0
ファイル: Talk.php プロジェクト: noahd1/opencfp
 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')];
 }
コード例 #5
0
ファイル: User.php プロジェクト: cloudtracer/opencfp
 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')];
 }
コード例 #6
0
ファイル: Search.php プロジェクト: GasimGasimzada/spot2
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['event' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\Event', 'event_id')];
 }
コード例 #7
0
ファイル: Shift.php プロジェクト: jkawell/employee-scheduling
 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')];
 }
コード例 #8
0
ファイル: Tag.php プロジェクト: GasimGasimzada/spot2
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['posts' => $mapper->hasManyThrough($entity, 'SpotTest\\Entity\\Post', 'SpotTest\\Entity\\PostTag', 'tag_id', 'post_id')];
 }
コード例 #9
0
ファイル: Post.php プロジェクト: GasimGasimzada/spot2
 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')];
 }
コード例 #10
0
ファイル: TalkComment.php プロジェクト: jaredfaris/opencfp
 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')];
 }
コード例 #11
0
ファイル: User.php プロジェクト: themrwilliams/opencfp
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talks' => $mapper->hasMany($entity, 'OpenCFP\\Entity\\Talk', 'user_id')];
 }
コード例 #12
0
ファイル: Speaker.php プロジェクト: themrwilliams/opencfp
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['user' => $mapper->belongsTo($entity, 'OpenCFP\\Entity\\User', 'user_id')];
 }
コード例 #13
0
 public static function relations(Mapper $mapper, Entity $entity)
 {
     return ['rol' => $mapper->belongsTo($entity, Rol::class, 'rol_id')];
 }
コード例 #14
0
ファイル: PostTag.php プロジェクト: GasimGasimzada/spot2
 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')];
 }
コード例 #15
0
ファイル: Client.php プロジェクト: jaredfaris/opencfp
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['endpoints' => $mapper->hasMany($entity, \OpenCFP\Domain\OAuth\Endpoint::class, 'client_id')];
 }
コード例 #16
0
ファイル: TalkMeta.php プロジェクト: cloudtracer/opencfp
 public static function relations(\Spot\MapperInterface $mapper, \Spot\EntityInterface $entity)
 {
     return ['talk' => $mapper->belongsTo($entity, 'OpenCFP\\Domain\\Entity\\Talk', 'talk_id')];
 }
コード例 #17
0
ファイル: User.php プロジェクト: jaredfaris/opencfp
 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')];
 }
コード例 #18
0
 public static function relations(MapperInterface $mapper, EntityInterface $entity)
 {
     return ['item' => $mapper->belongsTo($entity, 'SpotTest\\Entity\\' . ucwords($entity->item_type), 'item_id')];
 }
コード例 #19
0
ファイル: Event.php プロジェクト: GasimGasimzada/spot2
 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'])];
 }