this is my controller
<?php
namespace App\Controllers\Admin;
class SettingAccessController extends ControllerBase
{
public function indexAction()
{
//something
}
pubic function check($param1, $param2)
{
if (something) {
return true;
}
return false
}
}
and I want use "check" method in my view ? I have tried this way. but I get error
Macro 'check' does not exist
{% if check(param1, param2) %}
//do something
{% endif %}
how to make method can access in view ?