# |
Dec 15th 2017, 16:45 |
rafael.junqueira.sant |
I know I could use the plugin, but since it gives me $this->Flash->success and ...->error and elements by default, why should I use a plugin for this situation? |
# |
Dec 15th 2017, 16:44 |
dereuromark |
no value in creating tickets with a question here. |
# |
Dec 15th 2017, 16:44 |
dereuromark |
otherwise you need to figure out a core improvement as pull request and submit that. |
# |
Dec 15th 2017, 16:44 |
rafael.junqueira.sant |
"// In your View: Will use great_success.ctp instead of succcess.ctp <?= $this->Flash->render('flash', [ 'element' => 'great_success' ]);" |
# |
Dec 15th 2017, 16:44 |
dereuromark |
you could have saved yourself a lot of time by just using the plugin if you need them in diferent places or orders. |
# |
Dec 15th 2017, 16:43 |
rafael.junqueira.sant |
But how to print them in separate elements? How to use the elements? |
# |
Dec 15th 2017, 16:43 |
rafael.junqueira.sant |
Yes, it uses separate elements. |
# |
Dec 15th 2017, 16:43 |
dereuromark |
and also: styling is already different out of the box, as it uses separate elements |
# |
Dec 15th 2017, 16:43 |
dereuromark |
Depends on the structure of your session content, If it would be nested differently, you could probalby do what you want. |
# |
Dec 15th 2017, 16:42 |
rafael.junqueira.sant |
and still, I had to Jerry Rig it to make it work appropriately |
# |
Dec 15th 2017, 16:42 |
rafael.junqueira.sant |
I did |
# |
Dec 15th 2017, 16:42 |
dereuromark |
Sry if I confused you, my point was: check the code and find out. |
# |
Dec 15th 2017, 16:42 |
rafael.junqueira.sant |
Alright, this is the documentation page: https://book.cakephp.org/3.0/en/views/helpers/flash.html |
# |
Dec 15th 2017, 16:42 |
rafael.junqueira.sant |
Pretty obvious, right? Why would I need to use it I didn't want to display them in different ways? |
# |
Dec 15th 2017, 16:41 |
rafael.junqueira.sant |
For me it is simple: I use Flash->success and Flash->error so I can separate both to display them in different places and styles. |
# |
Dec 15th 2017, 16:40 |
rafael.junqueira.sant |
Can someone try to understand what's going on with $this->Flash->success? |
# |
Dec 15th 2017, 16:40 |
rafael.junqueira.sant |
Look, I need someone to give me a little bit of focused attention here, because there is something that is becoming obvious for me and for others, for some reason, it seems obvious in other way. |
# |
Dec 15th 2017, 16:28 |
inoas |
gnite |
# |
Dec 15th 2017, 16:28 |
inoas |
admad let me know if I really need to fix something @ cakephp/authentication - I want the PR to be done or rejected so that my mind clears ;-) |
# |
Dec 15th 2017, 16:22 |
aro |
i couldnt get ['rand()'] to work, so i just used shuffle on the collection |
# |
Dec 15th 2017, 16:15 |
neon1024 |
Sure it is aro, probably `->order(['RAND(field')])` |
# |
Dec 15th 2017, 16:03 |
hmic |
ask google! |
# |
Dec 15th 2017, 16:03 |
hmic |
you dont want to do that |
# |
Dec 15th 2017, 16:03 |
aro |
is it possible in cake3 to order by rand() |
# |
Dec 15th 2017, 15:49 |
obinoob |
I've noticed that Router::parse is deprecated in cakephp 3.5 cakephp documentation points that parseRequest should be used instead! However, it only accept requests, so now this code gets invalid, is there another new way of parsing a referer? $referer_params = Router::parse($this->referer('/', true)); |
# |
Dec 15th 2017, 15:42 |
neon1024 |
https://book.cakephp.org/3.0/en/core-libraries/events.html#getting-event-data-as-function-parameters |
# |
Dec 15th 2017, 15:39 |
meder_ |
seems like it |
# |
Dec 15th 2017, 15:38 |
meder_ |
does it just pass them by order in the array directly? |
# |
Dec 15th 2017, 15:38 |
meder_ |
$options becomes the entity itself |
# |
Dec 15th 2017, 15:38 |
meder_ |
if i pass ['entity' => $myEntity, 'poop' => 4] in the dispatcher itself, event $event, $options |
# |
Dec 15th 2017, 15:38 |
hmic |
so pass the entity inside an array |
# |
Dec 15th 2017, 15:38 |
hmic |
you are supposed to pass an array, or arrayobject?! |
# |
Dec 15th 2017, 15:38 |
meder_ |
weird, that's confusing. it converts the array weirdly |
# |
Dec 15th 2017, 15:35 |
meder_ |
ok |
# |
Dec 15th 2017, 15:34 |
dereuromark |
dont pass it directly, use k=>v |
# |
Dec 15th 2017, 15:32 |
neon1024 |
..in the array I mean |
# |
Dec 15th 2017, 15:31 |
neon1024 |
https://book.cakephp.org/3.0/en/core-libraries/events.html#dispatching-events |
# |
Dec 15th 2017, 15:31 |
neon1024 |
I believe you can pass whatever you want in the third options param |
# |
Dec 15th 2017, 15:29 |
meder_ |
it seems like it converts the entity to an array |
# |
Dec 15th 2017, 15:29 |
meder_ |
can you pass an entity to a cake event dispatch as an argument? |
# |
Dec 15th 2017, 15:12 |
admad |
so getting path with base is hardly gonna be missed and if someone still needs it then you can still do `$request->getAttribute('base') . $request->getRequestTarget()`. |