I need to send from the front office a admin URL: https://www.example.com/index.php?controller=AdminKbProductApprovalList.
The solution I've found is using $this->context->link->getLegacyAdminLink('AdminKbProductApprovalList', false);, which generates the correct URL,but without admin folder and this produces an error.
Warning: Use of undefined constant PS_ADMIN_DIR - assumed 'PS_ADMIN_DIR' (this will throw an Error in a future version of PHP) in /home/name/projects/asd.local/classes/Link.php on line 906.
How can I fix this?