AndrewSimm
Well-known member
I have some variables that I am getting from the address bar. These works perfectly in the controller. On the same page I have some widgets that display some statistics based on the variables from the address bar. Looking at my code below I think the issue is I can't figure out how to get parameterbag into the method, but I am not sure.
Error
ErrorException: Fatal Error: Call to undefined method CIS\Backend\Widgets\Rating::filter() src/addons/CIS/Backend/Widgets/Rating.php:17
PHP:
<?php
namespace CIS\Backend\Widgets;
use \XF\Widget\AbstractWidget;
use XF\Mvc\ParameterBag;
class Rating extends AbstractWidget
{
public function render()
{
//Page title
$title = "Rating";
//Get Class
$get_class = $this->filter('class', 'int');
Error
ErrorException: Fatal Error: Call to undefined method CIS\Backend\Widgets\Rating::filter() src/addons/CIS/Backend/Widgets/Rating.php:17