UserAgreementService
class UserAgreementService (View source)
Decides whether a user must accept the current user-agreement version and records acceptances.
Methods
No description
Check if user agreement is required for the given user
Record user agreement acceptance
Get the template path for the agreement page Always returns the default template since customization is done via content inclusion
Check if custom agreement content exists
Get current agreement version
Check if agreement system is enabled
Details
__construct(UserAgreementRepositoryInterface $repository, ConfigurationInterface $config)
No description
bool
isAgreementRequired(int $userId)
Check if user agreement is required for the given user
bool
recordAgreementAcceptance(int $userId, string $ipAddress, string $userAgent)
Record user agreement acceptance
string
getAgreementTemplate(string $theme = 'default')
Get the template path for the agreement page Always returns the default template since customization is done via content inclusion
bool
hasCustomContent(string $theme = 'default')
Check if custom agreement content exists
string
getCurrentVersion()
Get current agreement version
bool
isEnabled()
Check if agreement system is enabled