FollowTrait
Advert following; storage is the `AdvertFollower` DB entity (per logged-in user). Unlike the presenter-level `FollowTrait` it does not use `$this->advert` (null in a list); it loads the advert by `$advertId` instead.
Focused trait: only handle* signals and their processing. The shared finish (style, redraw,
flash) is delegated to ToggleRedrawTrait::finishToggle().
Table of Contents
Methods
- handleFollow() : void
- handleUnfollow() : void
- isFollowing() : bool
- getFollowUserId() : int|null
Methods
handleFollow()
public
handleFollow(int $advertId[, string $style = 'Style_1' ]) : void
Parameters
- $advertId : int
- $style : string = 'Style_1'
handleUnfollow()
public
handleUnfollow(int $advertId[, string $style = 'Style_1' ]) : void
Parameters
- $advertId : int
- $style : string = 'Style_1'
isFollowing()
public
isFollowing(int $advertId) : bool
Parameters
- $advertId : int
Return values
boolgetFollowUserId()
private
getFollowUserId() : int|null