I added the module zfcUserto my project through Composer and redefined it in the module ZfcUserOverride. I need to work with a slash, so I added a route to the redefined module.
ZfcUserOverridefile module.config.phpbelow:
<?php
$config = array(
'view_manager' => array(
'template_path_stack' => array(
'zfcuser' => __DIR__ . '/../view',
),
),
'controllers' => array(
'invokables' => array(
'zfcuser' => 'ZfcUserOverride\Controller\UserController',
),
)
);
$config['router']['routes']['zfcuser']['child_routes']['trailing_slash'] = array(
'type' => 'Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'zfcuser',
'action' => 'index',
),
),
);
return $config;
I added a new path, each of which works correctly.
But what if I want to delete a route? How to do it? I need something like:
$config['router']['routes']['zfcuser']['child_routes']['login'] = null;
Help me please. Thank.
source
share