isVisibleElement
The isVisibleElement hook is triggered when checking if an element should be
visible in the front end or not. An “element” in this case means either an article,
a front end module or a content element. In contrast to the other three hooks
getArticle, getFrontendModule and getContentElement one can prevent generating
the complete markup. The hook passes the model of the instance and the current
visibility state as arguments and expects the new visibility state as return value.
Parameters
\Contao\Model
$elementThe database result from table
tl_articleortl_contentortl_moduleas a Contao Model object.boolean
$isVisibleThe current visibility state.
Return Values
Add some custom checks and return true, if the element should be visible in the front end.
Return false if the element should not be visible in the front end.