Of course it's better to write it once rather than many places. But
remember, AppController does NOT deal with a particular Model.
If you name a controller "PostsController", it knows it'll work with Post
model. AppController has none of that.
So if you are writing some function that could be us
Generally you get the black hole if you add fields to the form without
using the form helper.
If you need to add information to the form that is not exposed to the user,
use hidden fields.
On Thursday, November 6, 2014 10:48:06 AM UTC+7, glk wrote:
>
> Hello everyone,
>
> I'm trying to "add" da
I have a model setup like following;
Parent hasMany Children
What do I do when I want to find a Parent who *doesn't have any Children*?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribe
beforeRender() is for the tasks you want to perform before views are
rendered.
$this->Request->data array gets reset every time any kind of request
happens so there is no point adding extra field in there in beforeRender().
2014年11月6日木曜日 12時48分06秒 UTC+9 glk:
>
> Hello everyone,
>
> I'm trying
Looks interesting, but my question was if it is more practical to duplicate
each function in each controller instead of having just one function in the
AppController. Which is best practice? What is faster when loading the
application/webpage.
On Thursday, November 6, 2014 6:50:12 PM UTC-6, eur
Read about https://github.com/FriendsOfCake/crud
it kind of does exactly that - but in a cleaner way :)
mark
Am Donnerstag, 6. November 2014 17:48:05 UTC+1 schrieb David Cole:
>
> I've always wondered if it is a preference or a standard to define
> function in your AppController instead of your
I've always wondered if it is a preference or a standard to define function
in your AppController instead of your Controller, for example:
public function admin_index() {...}
Instead of doing hte above in each Controller, is it alight to do this in
the AppController? This way the function is ac
Yes if you want to retain the same request data structures, then you will need
to update all you forms. However, you will need to updat all your views anyways
as the orm results are radically different as well.
Unfortunately, in order to fix many of the problems we had with the old orm,
many co
Yes if you want to retain the same request data structures, then you will need
to update all you forms. However, you will need to updat all your views anyways
as the orm results are radically different as well.
Unfortunately, in order to fix many of the problems we had with the old orm,
many co
I mean that unlrss you make inputs like input('model.field') the form helper
will not add the model names.
-mark
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
@glk, if you do this:
Form->create($contacts, ['type' => 'post', 'class' => 'well'])?>
Form->input('*Contacts*.nome',['label'=>'name:'])?>
Form->end(); ?>
But, in this example, you will have to change all the views.
2014-11-06 1:39 GMT-02:00 glk :
> Hello Mark,
>
> What do you mean by "The inpu
Hi,
I'm using CakePHP 2.3.10 and I have a problem with a login form in my
header.
When the login form is used from within a plugin view it sends the form to
/plugin_name/users/login instead of to /users/login.
I have found numerous posts on this topic and all state the same: I need to
add *'pl
12 matches
Mail list logo