Ozzy47
Well-known member
So I have this in my setup file:
Now while it works great, I also need to add a display conditions to the widget,
PHP:
<?php
namespace OzzModz\StaffWidget;
use XF\AddOn\AbstractSetup;
class Setup extends AbstractSetup
{
public function install(array $stepParams = [])
{
$this->createWidget(
'OzzModzStaff',
'OzzModzStaff',
[
'positions' => [
'forum_list_sidebar' => 10
]
]
);
}
public function upgrade(array $stepParams = [])
{
// TODO: Implement upgrade() method.
}
public function uninstall(array $stepParams = [])
{
$this->deleteWidget('OzzModzStaff');
}
}
Now while it works great, I also need to add a display conditions to the widget,
$xf.visitor.is_admin OR $xf.visitor.is_moderator
How do I do that? This is my first time messing with a widget.