errore controller
Buonasera,
sto facendo un modulo che richiama un metodel controller, ma non capisco perchè mi da errore..
il contenuto del file routing è il seguente:
gestioneutenti.utenti_form:
path: '/admin/config/gestioneutenti/creaUtente'
defaults:
_form: '\Drupal\gestioneutenti\Form\GestioneUtenteForm'
_title: 'Aggiungi utente'
requirements:
_permission: 'access administration pages'
options:
_admin_route: TRUE
gestioneutenti.mostra_utenti:
path: '/admin/config/gestioneutenti/visualizzaUtente'
defaults:
_controller: 'Drupal\gestioneutenti\Controller\GestioneutentiController::content'
_title: 'Mostra utenti'
requirements:
_permission: 'access administration pages'
options:
_admin_route: TRUE
mentre questo è il contenuto del file GestioneutentiController.php
<?php
namespace Drupal\gestioneutenti\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Database\Connection;
/**
* An example controller.
*/
class GestioneutentiController extends ControllerBase {
/**
* Returns a render-able array for a test page.
*/
public function content() {
$build = [
'#markup' => $this->t('Hello World!'),
];
return $build;
}
}
dove sbaglio ?
Risposte
Prova a postare l'errore.
Prova a postare l'errore.