Please define the variables `$class` and `$rel` before using them. Currently they are only defined when the `showon` attribute is set.
For example like this
````
$class = '';
$rel   = '';

if ($showon = $this->getAttribute('showon'))
{
    ...
````