# |
Oct 22nd 2009, 10:06 |
ionas |
see I do not even completely understand that (which aliases anyway, cake does use the singelton name as the variable name by convention, doesn't it?) |
# |
Oct 22nd 2009, 10:05 |
markstory |
override constructClasses() and move the aliases around. |
# |
Oct 22nd 2009, 10:05 |
ionas |
$this->ModelAlias/Component-Clashing |
# |
Oct 22nd 2009, 10:04 |
jcrawford |
nice blank white page :( http://book.cakephp.org/search/tagErrorMsg |
# |
Oct 22nd 2009, 10:04 |
markstory |
they do. |
# |
Oct 22nd 2009, 10:04 |
ionas |
think its better to give the user control over the namespace |
# |
Oct 22nd 2009, 10:04 |
ionas |
it has yes |
# |
Oct 22nd 2009, 10:04 |
markstory |
s/$this->Auth/$this->AppAuth/ |
# |
Oct 22nd 2009, 10:04 |
markstory |
does your edtior not have search + replace? |
# |
Oct 22nd 2009, 10:03 |
ionas |
that does not make sense, yes |
# |
Oct 22nd 2009, 10:03 |
markstory |
'Email' => array('as' => 'Auth'); |
# |
Oct 22nd 2009, 10:03 |
ionas |
Indirect? |
# |
Oct 22nd 2009, 10:03 |
markstory |
It makes things more indirect. |
# |
Oct 22nd 2009, 10:02 |
ionas |
markstory, besides that, do you see the benefit of being able to extend core components and helpers really easy by adding those aliases? When you have a product that is already finished and need some addition to some core helper or component, you just extend it and change a view lines in your controller (the alias) and thats it |
# |
Oct 22nd 2009, 10:00 |
ionas |
and would probably even accepd $f->input() ;) |
# |
Oct 22nd 2009, 10:00 |
ionas |
I can see that tiny views that have some constrains / conventions are okay yeah |
# |
Oct 22nd 2009, 10:00 |
markstory |
Perhaps I'm more creative with variable names though. |
# |
Oct 22nd 2009, 10:00 |
markstory |
I don't like $this->Form personally |
# |
Oct 22nd 2009, 09:58 |
ionas |
markstory, well then array('MyAuth' => array('as' => 'Auth')) |
# |
Oct 22nd 2009, 09:58 |
ionas |
markstory, why not? components and models share the same namespace on controllers (Breadcrume Model vs Breadcrume Controller), you can extend core components and core helpers easily then? |
# |
Oct 22nd 2009, 09:57 |
markstory |
because you just broke the settings arrays for both. |
# |
Oct 22nd 2009, 09:57 |
markstory |
ionas: no |
# |
Oct 22nd 2009, 09:57 |
ionas |
markstory, would you think it is a good idea to have aliases for Components and Helpers (like $components = array('MyAuth' => 'Auth); $helpers = array('MyForm' => 'Form); ? |
# |
Oct 22nd 2009, 09:56 |
markstory |
I think only the Component class is built in __construct |
# |
Oct 22nd 2009, 09:55 |
Iiridayn_ |
markstory: Thanks. I had thought that that was called from Controller::__construct. That sets my mind more at ease. |
# |
Oct 22nd 2009, 09:55 |
ionas |
make things really equal until it works and then add back your company specific model methods/variables |
# |
Oct 22nd 2009, 09:55 |
ionas |
dogmatic69, I'd suggest backing up your company model, cloning your industry model as your company model |
# |
Oct 22nd 2009, 09:55 |
dogmatic69 |
thx anyway |
# |
Oct 22nd 2009, 09:54 |
ionas |
dogmatic69, okay, no idea why it works then |
# |
Oct 22nd 2009, 09:54 |
ionas |
jcrawford, in 1.3 there is a fix in for setting a layout within setFlash - you could add the $form->error within that layout maybe |
# |
Oct 22nd 2009, 09:54 |
markstory |
Controller::constructClasses does that. |
# |
Oct 22nd 2009, 09:54 |
markstory |
no |
# |
Oct 22nd 2009, 09:54 |
Iiridayn_ |
markstory: When the controller is constructed, so are it's models and components, no? |
# |
Oct 22nd 2009, 09:54 |
ionas |
jcrawford, you can put the $form->error whereever you want (probably within "form->create", but not sure if that is required) |
# |
Oct 22nd 2009, 09:53 |
jcrawford |
ionas i will see what that holds for data thanks :D |
# |
Oct 22nd 2009, 09:53 |
jcrawford |
i have it working now with a find() then save() but there is a race condition there |
# |
Oct 22nd 2009, 09:53 |
markstory |
Iiridayn_: Well if you arent' using controller callbacks, I don't now if removing the construction of one object and setting 10 properties is going to really reduce load. |
# |
Oct 22nd 2009, 09:53 |
ionas |
reading Model->invalidFields or Model->errors or something |
# |
Oct 22nd 2009, 09:53 |
jcrawford |
so i would not want the message attached to a single form element |
# |
Oct 22nd 2009, 09:53 |
jcrawford |
ionas yes that is for a single field this deals with a unique constraint on multiple fields |
# |
Oct 22nd 2009, 09:52 |
ionas |
jcrawford, only via the controller |