If the check is only needed in the template, it seems logical to me to call the is_addon_active
method from the template. But if you prefer to check in PHP, it is better to check if the addon is available using the \XF::isAddOnActive()
method, because you are checking for the presence and content of options, and they will be available even if the addon is disabled, which will lead to unexpected results.