class UserAgreementService (View source)

Methods

__construct(DbUserAgreementRepository $repository, ConfigurationManager $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

Details

__construct(DbUserAgreementRepository $repository, ConfigurationManager $config)

No description

Parameters

DbUserAgreementRepository $repository
ConfigurationManager $config

bool isAgreementRequired(int $userId)

Check if user agreement is required for the given user

Parameters

int $userId

Return Value

bool

bool recordAgreementAcceptance(int $userId, string $ipAddress, string $userAgent)

Record user agreement acceptance

Parameters

int $userId
string $ipAddress
string $userAgent

Return Value

bool

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

Parameters

string $theme

Current theme (e.g., 'default')

Return Value

string

bool hasCustomContent(string $theme = 'default')

Check if custom agreement content exists

Parameters

string $theme

Current theme (e.g., 'default')

Return Value

bool

string getCurrentVersion()

Get current agreement version

Return Value

string

bool isEnabled()

Check if agreement system is enabled

Return Value

bool