Re: Debugging tool for cakephp

2012-07-30 Thread Борислав Събев
As @Alejandro said DebugKit is a very good solution that would do the job in most cases. If you want to be able to insert breakpoints, right inside PHP's ZEnd Engine (while it is executing) you can use XDebug of ZendDebug, but this second option will be needed very rarely. It should be used when

Re: Tool to visualize database schema on cakephp

2012-07-30 Thread Борислав Събев
Hi. Such a toll cannot be bundled with Cake itself because Cake can use different DataSources . The best tool I've used (for MySQL) is *MySQL Workbench*. It does design and forward/reverse engineering for MySQL only, but for "schema visua

Re: Entity Relationship: What's the best solution for CakePHP?

2012-07-30 Thread Walter Raponi
1. One Source has Many Comments? 2. One Comment has Many Sources? 3. The same Source can have Many Comments? 1. Comments table should have source_id inside. ($belongsTo = array('source'); ) 2. Sources table should have comment_id inside. ($belongsTo = array('comment'); ) 3. Create a commen

Re: How can I Populate my view from belongsTo relationship

2012-07-30 Thread Ain Devonshire
On Tuesday, July 31, 2012 11:27:11 AM UTC+8, Ain Devonshire wrote: > > I have a controller Users with function Profile > > public function profile($id=null){ > $log=$this->Auth->User('id'); > $user = $this->User->UserProfile->find('first',array( > 'conditions'=>array('User.id'=>$log), > 'recursi

Re: Controllers with same name

2012-07-30 Thread André Luis
Well, i´ve disabled the Cache and it works fine now, it must be a issue... latter i will submit as a issue. Em segunda-feira, 30 de julho de 2012 10h55min45s UTC-3, André Luis escreveu: > > Hi all, i am in a big trouble, and i dont know if it´s Cake PHP Issue, or > am i doing something wrong...

Re: HABTM association: How to populate ONLY the joining table

2012-07-30 Thread Ain Devonshire
i actually have the same issue but how can i put it in view when if i edit my user profile? i have Users and UserProfile table On Sunday, August 8, 2010 10:16:16 PM UTC+8, Mariano C. wrote: > > I have books and users table. Both tables have id field as PK, and > both have respective Book and Use

How can I Populate my view from belongsTo relationship

2012-07-30 Thread Ain Devonshire
I have a controller Users with function Profile public function profile($id=null){ $log=$this->Auth->User('id'); $user = $this->User->UserProfile->find('first',array( 'conditions'=>array('User.id'=>$log), 'recursive'=>1 )); $this->set(compact('user')); pr($user); } I also has a UserProfile Contr

Re: Debugging tool for cakephp

2012-07-30 Thread Alejandro Gómez Fernández
there is a plugin, called debug_kit and is a good tool specifically developed for cakephp. In my opinión, it's nice to use and very useful. Regards, Alejandro Gómez Fernández Enviado desde mi iPad El 30/07/2012, a las 23:43, Lightee escribió: > Dear cakephp experts, > > I am a newb

Debugging tool for cakephp

2012-07-30 Thread Lightee
Dear cakephp experts, I am a newbie to php. Can someone recommend a good debugging tool that they personally use for cakephp? I am open to all because I know nothing at the moment. Thank you for your help. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org C

Tool to visualize database schema on cakephp

2012-07-30 Thread Lightee
Dear cakephp experts, Does anyone know of tools that can help us visualize the database schema on cakephp? Hopefully, it can show the relationship (1 to many, 1 to 1) between different tables. Thank you. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Ch

Re: Oop Question? - accessing protected model methods from behaviours.

2012-07-30 Thread Josejulio Martínez
I had to do the very same, but instead of displaying to me the "Call to protected method Model::_deleteDependent() from context 'SoftDeletableBehavior' " it tried to execute the query "_deleteDependent" On Monday, September 19, 2011 9:52:14 PM UTC-5, #2Will wrote: > > ok, so i wrapped the

Attempting to reparent a TreeBehavior node -- assign new parent_id, lft, and rght values

2012-07-30 Thread Kevin Mitchell
Hi. Thank you! ... for helping. I'm fairly new to PHP and CakePHP. For my TopicTree model (with $actsAs = array('Tree');), I have a function in my controller which I want to simply assign a new parent_id. As I understand it, lft and rght values should then be updated automatically, via the Tree

Entity Relationship: What's the best solution for CakePHP?

2012-07-30 Thread Leonhart
Hi guys ;) I hope I'm not abusing this group for a technical question. I'm kinda new in CakePHP and it's the first time I'm using it for a true-app development. I want to learn how to create the best suitable database for CakePHP and I'm stuck in the following scenario: I've a "Comments" table a

control visibility of field with second level of depth

2012-07-30 Thread Mariano C.
I have this json: { - Offices: [ - { - Office: { - *address*: "JR street" - Company: - { - id: "3", - name: "ABC Software" }, }, - Person:

Re: hide model fields from controller

2012-07-30 Thread euromark
it is usually not the controller you need to worry about in the view level just dont output the variable and on input (forms etc) use whitelisting for the model methods to exclude the field on save etc. Am Montag, 30. Juli 2012 16:34:59 UTC+2 schrieb Mahmoud Adel Farid: > > i want any controll

hide model fields from controller

2012-07-30 Thread Mahmoud Adel Farid
i want any controller not to be able to access(read or write) a certain field in the model how can i accomplish that -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their C

Controllers with same name

2012-07-30 Thread André Luis
Hi all, i am in a big trouble, and i dont know if it´s Cake PHP Issue, or am i doing something wrong... But i have the Controller Categories at Representatives Plugin, also i have Categories at Contact plugin. When i try to access /admin/representatives/categories it tryes to reach the categori

Re: Design reusable CakePHP application

2012-07-30 Thread Amit
Is there any good tutorial on how to do authentication via REST? Ideally implementing Oauth 2.0. On Monday, July 30, 2012 8:02:57 AM UTC-5, Dr. Tarique Sani wrote: > > You can use whatever you want even javascript :-) > > T > > On Mon, Jul 30, 2012 at 6:09 PM, Mariano C. <> wrote: > > And so I

Re: Design reusable CakePHP application

2012-07-30 Thread Dr. Tarique Sani
You can use whatever you want even javascript :-) T On Mon, Jul 30, 2012 at 6:09 PM, Mariano C. wrote: > And so I should an alternative template engine to put everything together? > > Il giorno lunedì 30 luglio 2012 14:17:51 UTC+2, Dr. Tarique Sani ha scritto: >> >> IMO Go one step further the C

Re: Design reusable CakePHP application

2012-07-30 Thread Mariano C.
And so I should an alternative template engine to put everything together? Il giorno lunedì 30 luglio 2012 14:17:51 UTC+2, Dr. Tarique Sani ha scritto: > > IMO Go one step further the CakePHP application is just the webservice > and renders json/xml/whtever views - for this read > http://book.ca

Re: Design reusable CakePHP application

2012-07-30 Thread Dr. Tarique Sani
IMO Go one step further the CakePHP application is just the webservice and renders json/xml/whtever views - for this read http://book.cakephp.org/2.0/en/views/json-and-xml-views.html The consumer applications are developed 100% independent of the original CakePHP websevice providing app Tarique

Design reusable CakePHP application

2012-07-30 Thread Mariano C.
One of the rules for reusable code is: Develop your application like webservice. So I don't want to strictly bind controller with view. My idea is: - controllers just returns json info (just like a webservice does), - views calls that webservices, get the json and make html output.

Re: header information in outlook

2012-07-30 Thread Anna P
Has somebody solved that issue or know what causes the problem? I use Outlook Express 6 on XP and it displays e-mail messages correctly (they are sent as both - text and html). But with Outlook on Windows 7 e-mail displays header information, and content in both formats. I use CakePHP 2.0.5 and

[Models] saveAll doesn't work

2012-07-30 Thread TWEESTY
Hi all! I have one problem with the methode saveAll. I do a saveAll and i have this error : SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "body" violates not-null constraint Here, my models : class Topic extends AppModel { public $name = 'Topic'; public $belongs

Re: Problems running Cakephp2.1.1 with SQL Server 2008

2012-07-30 Thread Jorge
hi, i have the same problem, but i copy the file Sqlserver.php into my directory, and i receive this messagge: *Error: * Class 'DboSource' not found And you said "You shouldn't need to use custom DboSource.php imho." how and where can i configure this?? Thaks for all! El jueves, 12 de abri

Re: Be Aware of Pirated Copy of CakePhp 2.x User Management Plugin

2012-07-30 Thread Борислав Събев
I've been following up on the discussions around the "Eagle User Management Plugin" which has been directly advertised in the Cake Google groups. I personally do not think that it is okay to directly advertise in these discussion group as this is an Open source community that promotes Free So

Re: CakePHP REST service does not recognize POST

2012-07-30 Thread Zaky Katalan-Ezra
pr($this->RequestHandler) just above if( $this->RequestHandler->isPost() ) { What is the output? By the way, I use this to check post $this->request->is('post') On Thu, Jul 26, 2012 at 11:29 PM, frederikjacques wrote: > $this->RequestHandler -- Regards, Zaky Katalan-Ezra QA Administrator w

Re: set::sort question

2012-07-30 Thread Zaky Katalan-Ezra
http://php.net/manual/en/function.usort.php function cmp($a, $b) { if ($a['key1'] == $b['key1']) { if ($a['key2'] == $b['key2']) { return 0; }else{ return ($a['key2'] < $b['key2']) ? -1 : 1; } }else{ return ($a['key1'] < $b['key1']) ? -

Re: View Driven Pages

2012-07-30 Thread LordG
No replies? :( I hope the post is understandable. Does anyone have any input or comments on the idea? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related

Re: set::sort question

2012-07-30 Thread heohni
a) in this case, the DB can't help as the array contains data I put manually in b) It's not that urgent and I was hoping I was just overseeing something... If you just telling me that I cannot use 2 sort rules, I will arrange my array in another way to get to my goal. Thanks :-) Am Montag, 30.

Re: set::sort question

2012-07-30 Thread euromark
a) why not providing the data correctly sorted from the db level? let mysql do the work b) if that is not possible for some reason, why not manually iterating over the array? probably still faster than the Set/Hash class anyway. yeah, might be a few lines more, but at least you got it in a few m

Re: set::sort question

2012-07-30 Thread heohni
does anyone has an idea? Am Freitag, 27. Juli 2012 12:36:15 UTC+2 schrieb heohni: > > Hi, > > I have this array: > Array > ( > [240] => Array > ( > [Member] => Array > ( > [id] => 112 > ) > > [Payment] => Array > ( > [date] => 0712 > > > ) > ) > > I want to use the set::sort function to sort first