<?php
class EWRmedio_Route_Media_Category implements XenForo_Route_Interface
{
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
$action = $router->resolveActionWithIntegerParam($routePath, $request, 'category_id');
$action = $router->resolveActionAsPageNumber($action, $request);
return $router->getRouteMatch('EWRmedio_ControllerPublic_Media_Category', $action, 'media_category');
}
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
$outputPrefix = str_replace('_', '/', $outputPrefix);
$action = XenForo_Link::getPageNumberAsAction($action, $extraParams);
return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'category_id', 'category_name');
}
}