Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-04 Thread Dr. Tarique Sani
If I were to do it I would leave the HTML which is before and after the input tag out of the FormHelper - Keep it simple... T On Fri, Aug 1, 2014 at 8:25 PM, Mikaël Capelle capelle.mik...@gmail.com wrote: Thanks for the link! Unfortunately it doesn't help since it does not allow user to

cakephp url change

2014-08-04 Thread vbpupil
Hi guys I have a question that im sure someone will be able to answer very quickly. Im working on a site where customers can add their own property to sell, if they click list a property the system first checks that they are logged in if not asks them to login, then upon a successful signin it

Re: cakephp url change

2014-08-04 Thread Stephen S
You can save their account number to the session, a few examples: $this-Session-read('Auth.User.id') is the user id once being logged in $this-Session-read('Auth.User.account_number') would hold the account_number field from the users table (if you had one). Or you could go through

CakePHP 3.0.0-alpha2 Released

2014-08-04 Thread Nethues BD
New Features in 3.0.0-alpha2 Router Refactor and Builder Based APIs. The Router class has been re-factored internally and new methods have been added to allow your routes file to stay DRYer than ever before. In addition to improved methods, the performance of parsing incoming URLs has been

Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-04 Thread Mikaël Capelle
How would you do that? I can't do this: echo $htmlBefore.$this-Form-input().$htmlAfter ; because I need to include it inside the generated HTML. Of course, I could create the whole HTML outside the helper and use the direct method ('text' for example) to get only the input tag, but it would

CakePHP 3.0 fatal error

2014-08-04 Thread Jipson Thomas
Hi Team, After a composer update command on my cakephp 3.0 I am getting a fatal error as following. *Warning*: require(/Applications/XAMPP/xamppfiles/htdocs/prms.panovus.com/public_html/vendor/cakephp/cakephp/src/bootstrap.php): failed to open stream: No such file or directory in

Improve consistency - Compatibility Breaks in CakePHP 3.0

2014-08-04 Thread nethues
In more than a few places compatibility was broken to create better cohesion across CakePHP. You can write the configuration as : $obj-config(); $obj-config('engine'); $obj-config(['key' = 'value', 'key2' = 'value']); $obj-config('key', 'value'); All classes that have settings can be

Re: CakePHP 3.0 fatal error

2014-08-04 Thread José Lorenzo
The config folder was moved out of src, it should be placed on the root folder with the name config: https://github.com/cakephp/app/tree/master/config On Monday, August 4, 2014 12:24:06 PM UTC+2, Jipson Thomas wrote: Hi Team, After a composer update command on my cakephp 3.0 I am getting a

Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-04 Thread Dr. Tarique Sani
div class=input-group span class=input-group-addon@/span This part of the input group is NOT a part of the form element thus as a best compromise I would put it in a separate helper method with options - so something like $this-Form-inputGroup([class='input-group-addon', 'text'='@']);

Re: CakePHP 3.0 fatal error

2014-08-04 Thread Jipson Thomas
Thank you Jose Lorenzo. I moved all my code to a fresh installation and it is working now. Regards, Jipson On Monday, 4 August 2014 11:54:54 UTC+1, José Lorenzo wrote: The config folder was moved out of src, it should be placed on the root folder with the name config:

Re: CakePHP3 - How to get the data od second level relation ship table.

2014-08-04 Thread Jipson Thomas
Hi Mark, Sorry for the delay due to the weekend off. The sql printed is as following = SELECT Companies.id AS `Companies__id`, Companies.company_name AS `Companies__company_name`, Companies.logo_url AS `Companies__logo_url`,

Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-04 Thread Dr. Tarique Sani
I understand your point of view as well and I know what the default helper does. It is a pain but you are writing a custom helper - you can freely do what you want :) Why not override the templates in the config of your helper as Jose suggested and have additional methods in your helper which

Saving data to Has Many relationship table from single form in CakePHP 3

2014-08-04 Thread Jipson Thomas
Hi All, Would you please give me some details or samples of saving data from a single form to the tables main and has many relationships. I tries with the normal way by adding a modelname.fieldname on form and the sual newentity of main table but it through false on save(); Please help me to

Re: Saving data to Has Many relationship table from single form in CakePHP 3

2014-08-04 Thread José Lorenzo
Have you tried following the instructions in the book? What is failing? On Monday, August 4, 2014 3:43:20 PM UTC+2, Jipson Thomas wrote: Hi All, Would you please give me some details or samples of saving data from a single form to the tables main and has many relationships. I tries with the

Re: Saving data to Has Many relationship table from single form in CakePHP 3

2014-08-04 Thread Jipson Thomas
Hi Jose Lorenzo, Thank you. I am following the book on following url to do this. http://book.cakephp.org/3.0/en/orm/table-objects.html Something is blocking to save data. My Table structure is as follows. === A Vendor Table A Vendor manager table with vendor_id and user_id fields A

Re: Saving data to Has Many relationship table from single form in CakePHP 3

2014-08-04 Thread Jipson Thomas
The save method is returning a false only not any error messages. On Monday, 4 August 2014 14:43:20 UTC+1, Jipson Thomas wrote: Hi All, Would you please give me some details or samples of saving data from a single form to the tables main and has many relationships. I tries with the normal

Re: Saving data to Has Many relationship table from single form in CakePHP 3

2014-08-04 Thread Jipson Thomas
Hi, When I change the controller code as follows, It saves in vendor table only and return a true value. $vendors = TableRegistry::get('Vendors'); if ($this-request-is('post')) { $vendor = new Vendor($this-request-data['Vendor']); $vendor-VendorManagers =

Re: How to get last insert id in cakePHP 3

2014-08-04 Thread euromark
Are you sure? https://github.com/cakephp/cakephp/blob/3.0/tests/TestCase/ORM/TableTest.php#L1177 so $result-id should work fine: $result = $this-save(...); $id = $result-id; mark Am Montag, 4. August 2014 19:01:49 UTC+2 schrieb Jipson Thomas: Hi, Would you please let me know how I can get

Re: Saving data to Has Many relationship table from single form in CakePHP 3

2014-08-04 Thread José Lorenzo
I would recommend that you use the bake console tool to create the initial controller code and forms, that way I'm sure you will learn and understand how forms should be structured. On Monday, August 4, 2014 5:46:29 PM UTC+2, Jipson Thomas wrote: Hi, When I change the controller code as

PHPJasperXML

2014-08-04 Thread Lorenz
Dear community Recently I found a project named PHPJasperXML, made some successful standalone tests and then tried to integrate it into my cake application. http://www.simitgroup.com/?q=PHPJasperXML I put all necessary files into the Vendor folder and was also able to load them. But while

updating cake 1.2.5 to 2.5.3

2014-08-04 Thread 'Couples Corner' via CakePHP
Hello, I have installed a new copy of 2.5.3 which is working but after transferring files from old app I am getting error messages: I have also noticed that old site didn;t have a AppController except in Cake library? There is a base_app_controller which seems to have the login requirements

Re: updating cake 1.2.5 to 2.5.3

2014-08-04 Thread euromark
Did you follow the upgrade migration guide? And properly migrated all files as outlined there? mark Am Montag, 4. August 2014 19:35:55 UTC+2 schrieb Couples Corner: Hello, I have installed a new copy of 2.5.3 which is working but after transferring files from old app I am getting error

Re: CakePHP 3.0.0-alpha2 released

2014-08-04 Thread Joe Theuerkauf
Quick correction: routes.php link is 404. Should be (i think): *https://github.com/cakephp/app/blob/master/config/routes.php* On Monday, 28 July 2014 03:13:14 UTC-4, José Lorenzo wrote: The CakePHP core team is proud to announce the immediate availability of CakePHP 3.0.0-alpha2

cant use email as login cakephp

2014-08-04 Thread ajt
Hi, I cant authenticate users when I login in using appcontroller code . I login with a non admin role and I still get through. . In fact I dont get any error and no debug value appears so the isAuthorized($user) doesnt work.l use the same code without email and used username in another