Text after "div class =" itemprop = "text">
I am using the latest (Dev-Guru) Sonata Admin and I Sonata Admin for my own createAction () method want to make . . I want to save some user information, because I want to save some time, because what I have to do,
my custom controller is - s \ CoreBundle \ controller \ NewsAdminConroller.php
& lt ;? Php namespace s \ core bundle \ controller; Use Sonata \ AdminBundle \ Controller \ CRUDController as the controller; Use Symfony \ Component \ Security \ core \ SecurityContextInterface; Class NewsAdminController extends the Controller {/ ** * Set system User ID * / Private function updateFields ($ object) {// some code - this is my own method} Public function createAction (Request $ request = null) code for // Creating ... this is similar to the default code}}
Default CRUD - Sonata \ AdminBundle \ Controller \ CRUDController.php:
Class CRUDController extends Controller {public function createAction (request $ request = null) {// ...}} Both arguments (in the same way) And it gives me an error: PHP strict standards: S \ CoreBundle \ Controller \ NewsAdminController's :: createAction declaration (Sonata \ AdminBundle \ Controller) \ CRUDController :: createAction (Symfony \ component \ HttpFoundation \ request must be compatible with $ request = zero) /home/mark/dev/project/src/S/CoreBundle/Controller/NewsAdminController.php on line 129
Sonata \ AdminBundle \ Controller \ CRUDController :: createAction (Symfony \ Component \ HttpFoundation \ Request $ request = NULL)
a request object
, but if the Do not declare it, then it indicates that the S \ CoreBundle \ COntroller \ Request
simply use the "Symfony \ Component \ HttpFoundation \ Request; "
at the top of the file.
No comments:
Post a Comment