UserPrivacyRepositoryInterface
in
Interface UserPrivacy.
Tags
Table of Contents
Methods
- collectProfileMenuSetting() : array<string, mixed>
- Collect {resource_name}.profile_menu.
- collectProfilePrivacySettingByEntity() : array<string, mixed>
- Collect profile privacy setting based on entity name.
- convertPrivacySettingName() : string
- deleteUserPrivacy() : int
- Delete user privacy when deleting a user.
- getBirthdayOptionsForForm() : array<string, mixed>
- getBirthdaySetting() : array<string, mixed>
- Get Date of Birth setting of an user.
- getItemPrivacySettings() : array<int, mixed>
- Get Item default privacy list of an user. [ setting_name => 0 ].
- getItemPrivacySettingsForValidate() : array<string, mixed>
- getPrivacyTypes() : array<string, mixed>
- getPrivacyTypesByEntity() : array<string, mixed>
- getProfileMenuSettings() : array<int, mixed>
- Get profile menu setting of an user. [ setting_name => 0 ].
- getProfileMenuSettingsForValidate() : array<string, mixed>
- getProfileSettings() : array<int, mixed>
- Get profile setting of an user. Support page/group/ v.v... [ setting_name => 0 ].
- getProfileSettingsForValidate() : array<string, mixed>
- getUserPrivacy() : array<string, mixed>
- Get user privacy.
- getUserPrivacyByName() : UserPrivacy|null
- installPrivacyTypes() : void
- Install privacy types.
- updatePrivacyResourceValueByEntity() : void
- Update user privacy resource value by entity type.
- updateUserPrivacy() : array<string, mixed>
- Update user privacy.
Methods
collectProfileMenuSetting()
Collect {resource_name}.profile_menu.
public
collectProfileMenuSetting() : array<string, mixed>
[ 'privacy_name' => [ 'phrase' => 'abc', 'default' => 0, 'list' => [ 0 => Everyone, 1 => Friend, ] ] ].
Return values
array<string, mixed>collectProfilePrivacySettingByEntity()
Collect profile privacy setting based on entity name.
public
collectProfilePrivacySettingByEntity(string $entityType) : array<string, mixed>
Parameters
- $entityType : string
Return values
array<string, mixed>convertPrivacySettingName()
public
convertPrivacySettingName(string $privacyName) : string
Parameters
- $privacyName : string
Return values
stringdeleteUserPrivacy()
Delete user privacy when deleting a user.
public
deleteUserPrivacy(int $userId) : int
Parameters
- $userId : int
Return values
intgetBirthdayOptionsForForm()
public
getBirthdayOptionsForForm(bool $isAdmin) : array<string, mixed>
Parameters
- $isAdmin : bool
Return values
array<string, mixed>getBirthdaySetting()
Get Date of Birth setting of an user.
public
getBirthdaySetting(User $user) : array<string, mixed>
Parameters
- $user : User
Return values
array<string, mixed>getItemPrivacySettings()
Get Item default privacy list of an user. [ setting_name => 0 ].
public
getItemPrivacySettings(int $userId) : array<int, mixed>
Parameters
- $userId : int
Return values
array<int, mixed>getItemPrivacySettingsForValidate()
public
getItemPrivacySettingsForValidate(int $userId) : array<string, mixed>
Parameters
- $userId : int
Return values
array<string, mixed>getPrivacyTypes()
public
getPrivacyTypes() : array<string, mixed>
Return values
array<string, mixed>getPrivacyTypesByEntity()
public
getPrivacyTypesByEntity(string $entityType) : array<string, mixed>
Parameters
- $entityType : string
Return values
array<string, mixed>getProfileMenuSettings()
Get profile menu setting of an user. [ setting_name => 0 ].
public
getProfileMenuSettings(int $userId) : array<int, mixed>
Parameters
- $userId : int
Return values
array<int, mixed>getProfileMenuSettingsForValidate()
public
getProfileMenuSettingsForValidate(int $userId) : array<string, mixed>
Parameters
- $userId : int
Return values
array<string, mixed>getProfileSettings()
Get profile setting of an user. Support page/group/ v.v... [ setting_name => 0 ].
public
getProfileSettings(int $userId) : array<int, mixed>
Parameters
- $userId : int
Return values
array<int, mixed>getProfileSettingsForValidate()
public
getProfileSettingsForValidate(int $userId) : array<string, mixed>
Parameters
- $userId : int
Return values
array<string, mixed>getUserPrivacy()
Get user privacy.
public
getUserPrivacy(int $userId) : array<string, mixed>
Parameters
- $userId : int
Return values
array<string, mixed>getUserPrivacyByName()
public
getUserPrivacyByName(int $userId, string $name) : UserPrivacy|null
Parameters
- $userId : int
- $name : string
Return values
UserPrivacy|nullinstallPrivacyTypes()
Install privacy types.
public
installPrivacyTypes() : void
updatePrivacyResourceValueByEntity()
Update user privacy resource value by entity type.
public
updatePrivacyResourceValueByEntity(string $entityType, int $value) : void
Parameters
- $entityType : string
- $value : int
updateUserPrivacy()
Update user privacy.
public
updateUserPrivacy(int $userId, array<string, mixed> $params) : array<string, mixed>
Parameters
- $userId : int
- $params : array<string, mixed>
-
[profile.view_profile => 0, profile.profile_info => 0]
Return values
array<string, mixed> —[profile.view_profile => 1, profile.profile_info => 1]