stan1226
Member
I am trying to extend a function of the XFMG.
I uploaded an addon for this, with the file stan1226\XFMGOrderByTitle\OrderByTitle\NewAbstractList.php which should replace the getAvailableSorts() function of XFMG\ControllerPlugin\AbstractPlugin.php
I added a class extension in developer admin panel:
XFMG\ControllerPlugin\AbstractPlugin
->
stan1226\XFMGOrderByTitle\OrderByTitle\NewAbstractList
designated to my addon
I included a vardump to test if it is actually called, here's my code
	
	
	
		
So far nothing I try actually calls my function (removing XFCP_, try to extend the XF\ControllerPlugin\AbstractPlugin that the XFMG is extending, etc). Anybody got an idea what is missing here? I really appreciate any help.
				
			I uploaded an addon for this, with the file stan1226\XFMGOrderByTitle\OrderByTitle\NewAbstractList.php which should replace the getAvailableSorts() function of XFMG\ControllerPlugin\AbstractPlugin.php
I added a class extension in developer admin panel:
XFMG\ControllerPlugin\AbstractPlugin
->
stan1226\XFMGOrderByTitle\OrderByTitle\NewAbstractList
designated to my addon
I included a vardump to test if it is actually called, here's my code
		PHP:
	
	<?php
namespace stan1226\XFMGOrderByTitle\OrderByTitle;
abstract class NewAbstractList extends XFCP_AbstractPlugin
{
    public function getAvailableSorts()
    {
        \XF::dump('test');
        // maps [name of sort] => field in/relative to MediaItem entity
        return [
            'comment_count' => 'comment_count',
            'rating_weighted' => 'rating_weighted',
            'reaction_score' => 'reaction_score',
            'view_count' => 'view_count',
            'title' => 'title'
        ];
    }
}So far nothing I try actually calls my function (removing XFCP_, try to extend the XF\ControllerPlugin\AbstractPlugin that the XFMG is extending, etc). Anybody got an idea what is missing here? I really appreciate any help.
 
 
		
 
 
		 
 
		