Re: TestSuite in CakePHP3

2014-08-05 Thread euromark
I see you already made a PR :) https://github.com/cakephp/app/pull/103

Am Dienstag, 5. August 2014 17:22:43 UTC+2 schrieb Anthony GRASSIOT:
>
> Dear guys,
>
> as the test suite as been removed from Cake 3.X, is there a reason why we 
> are keeping those files around ?
>
> /webroot/images/test.error-icon.png
> /webroot/images/test.fail-icon.png
> /webroot/images/test.pass-icon.png
> /webroot/images/test.skip-icon.png
>
> Moreover I think we could get rid of all the `.code-coverage-xxx`classes 
> in the cake.generic.css
>
> May I open a PR for this ?
>
> Regards
> Anto
>

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: url canged but view did'nt

2014-08-05 Thread Andras Kende
Looks like a wrong .htaccess

http://www.nama-bayi.co/123
http://www.nama-bayi.co/abc

http://www.nama-bayi.co/index.php/Namabayis/add


Andras Kende

On Aug 5, 2014, at 10:00 AM, Zippo Indonesia  wrote:

> Hallo All
> my name marzuki
> today im learning cakephp 2.X
> 
> no problem in my local host so far
> but when migrate to hosting
> www.nama-bayi.co
> when i clik a link, url change but the layout not.
> 
> sory about my english
> many thanks before
> marzuki
> 
> 
> -- 
> 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 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Advice on MVC pattern for stats site

2014-08-05 Thread Jeremy Burns : Class Outfit
I'd make them either separate controller actions or a single action that 
accepts a parameter and then tidy them up with a route. The controller function 
can then either render the view associated with the action(s), specify a view 
to render and/or specify a layout.


On 5 Aug 2014, at 20:08, Russell Lewis  wrote:

> I'm building an application that serves statistics for a local sports league. 
>  I'd like to have separate views for the data depending on if the stats are 
> form league games or tournaments or just practice.  Ideally, a user would go 
> to domain.com/tournament/ or /league/ or /practice/ and get directed 
> appropriately.  Since I want to use different layouts, views, etc for each 
> different area but the underlying Models are going to be the same no matter 
> what.  I'm curious what the CakePHP way would be to accomplish this.  My 
> thinking right now is to have separate league, tournament and practice 
> controllers that don't actually tie to models themselves but just serve to 
> encapsulate the different areas of the site.  Does that make sense?  Is there 
> a smarter way to design this?  Gotchas or issues that might arise using 
> controllers that way?
> 
> Thanks!
> 
> -- 
> 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 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


TestSuite in CakePHP3

2014-08-05 Thread Anthony GRASSIOT
Dear guys,

as the test suite as been removed from Cake 3.X, is there a reason why we 
are keeping those files around ?

/webroot/images/test.error-icon.png
/webroot/images/test.fail-icon.png
/webroot/images/test.pass-icon.png
/webroot/images/test.skip-icon.png

Moreover I think we could get rid of all the `.code-coverage-xxx`classes in 
the cake.generic.css

May I open a PR for this ?

Regards
Anto

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Advice on MVC pattern for stats site

2014-08-05 Thread Russell Lewis
I'm building an application that serves statistics for a local sports 
league.  I'd like to have separate views for the data depending on if the 
stats are form league games or tournaments or just practice.  Ideally, a 
user would go to domain.com/tournament/ or /league/ or /practice/ and get 
directed appropriately.  Since I want to use different layouts, views, etc 
for each different area but the underlying Models are going to be the same 
no matter what.  I'm curious what the CakePHP way would be to accomplish 
this.  My thinking right now is to have separate league, tournament and 
practice controllers that don't actually tie to models themselves but just 
serve to encapsulate the different areas of the site.  Does that make 
sense?  Is there a smarter way to design this?  Gotchas or issues that 
might arise using controllers that way?

Thanks!

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


url canged but view did'nt

2014-08-05 Thread Zippo Indonesia
Hallo All
my name marzuki
today im learning cakephp 2.X

no problem in my local host so far
but when migrate to hosting
www.nama-bayi.co
when i clik a link, url change but the layout not.

sory about my english
many thanks before
marzuki

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


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

2014-08-05 Thread Jipson Thomas
Thank you Jose. Now I am doing in that way. I will update you the result.
Regards,
Jipson

On Tuesday, 5 August 2014 12:33:48 UTC+1, José Lorenzo wrote:
>
> Do as I told you in my previous message: input('related_propery.field')
>
> On Tuesday, August 5, 2014 11:19:29 AM UTC+2, Jipson Thomas wrote:
>>
>> Hi Jose,
>> Sorry. What I said in my last thread that I re created my models ,views 
>> and controllers through bake (The code I pasted in an older thread was not 
>> from bake command.). The form created through bake doesn't include the user 
>> table inputs. I will paste the code of form generated through bake below.
>> ===
>>
>> 
>> Form->create($vendor); ?>
>> 
>> 
>> > echo $this->Form->input('company_name');
>> echo $this->Form->input('logo_url');
>> echo $this->Form->input('email_domain');
>> echo $this->Form->input('phone');
>> echo $this->Form->input('fax');
>> echo $this->Form->input('website');
>> echo $this->Form->input('address');
>> echo $this->Form->input('country');
>> echo $this->Form->input('city');
>> echo $this->Form->input('state');
>> echo $this->Form->input('postalcode');
>> echo $this->Form->input('subscription_package');
>> echo $this->Form->input('status');
>> echo $this->Form->input('no_emails');
>> echo $this->Form->input('no_partners');
>> echo $this->Form->input('coupon_id');
>> echo $this->Form->input('language');
>> ?>
>> 
>> Form->button(__('Submit')); ?>
>> Form->end(); ?>
>> 
>> 
>> 
>> 
>> Html->link(__('List Vendors'), ['action' => 
>> 'index']); ?>
>> Html->link(__('List Coupons'), ['controller' => 
>> 'Coupons', 'action' => 'index']); ?> 
>> Html->link(__('New Coupon'), ['controller' => 
>> 'Coupons', 'action' => 'add']); ?> 
>> Html->link(__('List Partners'), ['controller' => 
>> 'Partners', 'action' => 'index']); ?> 
>> Html->link(__('New Partner'), ['controller' => 
>> 'Partners', 'action' => 'add']); ?> 
>> Html->link(__('List VendorManagers'), 
>> ['controller' => 'VendorManagers', 'action' => 'index']); ?> 
>> Html->link(__('New Vendor Manager'), ['controller' 
>> => 'VendorManagers', 'action' => 'add']); ?> 
>> 
>> 
>>
>> ==
>>
>> The above code is to create separate forms for each table. My requirement 
>> is to make a single signup form for all the 3 tables.
>>
>> Apologize to be a continuing burdan...
>>
>> Regards,
>> Jipson
>>
>>
>> On Tuesday, 5 August 2014 10:11:36 UTC+1, José Lorenzo wrote:
>>>
>>> I find hard to believe that the form you showed above was generated by 
>>> bake, but I can definitely look if there is any errors in the bake tool. 
>>> The reason I say that is that we are not using the 'UppercaseThing.field' 
>>> notation anymore, we use lowercase properties.
>>> For example if Articles belongsTo Authors the form would look like:
>>>
>>>  Form->input('title') ?>
>>>  Form->input('author.name') ?>
>>>  Form->input('author.email') ?>
>>>
>>> On Tuesday, August 5, 2014 10:48:56 AM UTC+2, Jipson Thomas wrote:

 Hi Jose,
 Yes , I did the controller, model and view creation through the bake 
 console. But it is not helping me to save data from single form to 
 multiple 
 tables. In my case the vendor signup form is having the input  fields to 
 vendor table, vendor manager table and a user table. Would you please help 
 me to find a solution on this?

 Regards,
 Jipson

 On Monday, 4 August 2014 18:26:48 UTC+1, José Lorenzo wrote:
>
> 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 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 = [
>> new 
>> VendorManager($this->request->data['VendorManager']),
>> ];
>> $vendor->Users = [
>> new User($this->request->data['User']),
>> ];
>> //print_r($vendor);
>> if ($vendors->save($vendor)) {
>> $this->Flash->success(__('The vendor has been 
>> saved'));
>> return $this->redirect(['action' => 'index']);
>> }
>> $this->Flash->error(__('Unable to add the vendor'));
>> }
>> $this->set('vendor', $vendor);
>> $this->set('subscription_package', $id)

Re: RFC: German CakePHP Docs

2014-08-05 Thread José Lorenzo
Ich spreche nicht deutsch!

On Tuesday, August 5, 2014 1:20:06 PM UTC+2, ravag...@gmail.com wrote:
>
> Hello bakers!
>
> Recently there was a Pull Request on GitHub 
>  for adding *German 
> documentation* to the Cookbook.
>
> Dereuromark  (CakePHP core developer) and 
> rme  (CakePHP docs contributor) are both 
> German speaking.
> We both don't see a pressing need for a German documentation for the 
> CakePHP framework.
>
> We ask all German speaking developers of our community to read the 
> discussion in the Pull Request on GitHub 
> .
> Please give us your opinion and may be your commitment to contribute to 
> the German docs.
>
> Thank you and hopefully see you at the CakeFest 2014 
> !
>
> Greetings from Switzerland
> Marc
>

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


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

2014-08-05 Thread José Lorenzo
Do as I told you in my previous message: input('related_propery.field')

On Tuesday, August 5, 2014 11:19:29 AM UTC+2, Jipson Thomas wrote:
>
> Hi Jose,
> Sorry. What I said in my last thread that I re created my models ,views 
> and controllers through bake (The code I pasted in an older thread was not 
> from bake command.). The form created through bake doesn't include the user 
> table inputs. I will paste the code of form generated through bake below.
> ===
>
> 
> Form->create($vendor); ?>
> 
> 
>  echo $this->Form->input('company_name');
> echo $this->Form->input('logo_url');
> echo $this->Form->input('email_domain');
> echo $this->Form->input('phone');
> echo $this->Form->input('fax');
> echo $this->Form->input('website');
> echo $this->Form->input('address');
> echo $this->Form->input('country');
> echo $this->Form->input('city');
> echo $this->Form->input('state');
> echo $this->Form->input('postalcode');
> echo $this->Form->input('subscription_package');
> echo $this->Form->input('status');
> echo $this->Form->input('no_emails');
> echo $this->Form->input('no_partners');
> echo $this->Form->input('coupon_id');
> echo $this->Form->input('language');
> ?>
> 
> Form->button(__('Submit')); ?>
> Form->end(); ?>
> 
> 
> 
> 
> Html->link(__('List Vendors'), ['action' => 
> 'index']); ?>
> Html->link(__('List Coupons'), ['controller' => 
> 'Coupons', 'action' => 'index']); ?> 
> Html->link(__('New Coupon'), ['controller' => 
> 'Coupons', 'action' => 'add']); ?> 
> Html->link(__('List Partners'), ['controller' => 
> 'Partners', 'action' => 'index']); ?> 
> Html->link(__('New Partner'), ['controller' => 
> 'Partners', 'action' => 'add']); ?> 
> Html->link(__('List VendorManagers'), ['controller' 
> => 'VendorManagers', 'action' => 'index']); ?> 
> Html->link(__('New Vendor Manager'), ['controller' 
> => 'VendorManagers', 'action' => 'add']); ?> 
> 
> 
>
> ==
>
> The above code is to create separate forms for each table. My requirement 
> is to make a single signup form for all the 3 tables.
>
> Apologize to be a continuing burdan...
>
> Regards,
> Jipson
>
>
> On Tuesday, 5 August 2014 10:11:36 UTC+1, José Lorenzo wrote:
>>
>> I find hard to believe that the form you showed above was generated by 
>> bake, but I can definitely look if there is any errors in the bake tool. 
>> The reason I say that is that we are not using the 'UppercaseThing.field' 
>> notation anymore, we use lowercase properties.
>> For example if Articles belongsTo Authors the form would look like:
>>
>>  Form->input('title') ?>
>>  Form->input('author.name') ?>
>>  Form->input('author.email') ?>
>>
>> On Tuesday, August 5, 2014 10:48:56 AM UTC+2, Jipson Thomas wrote:
>>>
>>> Hi Jose,
>>> Yes , I did the controller, model and view creation through the bake 
>>> console. But it is not helping me to save data from single form to multiple 
>>> tables. In my case the vendor signup form is having the input  fields to 
>>> vendor table, vendor manager table and a user table. Would you please help 
>>> me to find a solution on this?
>>>
>>> Regards,
>>> Jipson
>>>
>>> On Monday, 4 August 2014 18:26:48 UTC+1, José Lorenzo wrote:

 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 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 = [
> new 
> VendorManager($this->request->data['VendorManager']),
> ];
> $vendor->Users = [
> new User($this->request->data['User']),
> ];
> //print_r($vendor);
> if ($vendors->save($vendor)) {
> $this->Flash->success(__('The vendor has been saved'));
> return $this->redirect(['action' => 'index']);
> }
> $this->Flash->error(__('Unable to add the vendor'));
> }
> $this->set('vendor', $vendor);
> $this->set('subscription_package', $id);
> $this->set('subscription_type', $payoption);
>
> On Monday, 4 August 2014 16:17:10 UTC+1, Jipson Thomas wrote:
>>
>> 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:
>

RFC: German CakePHP Docs

2014-08-05 Thread ravage1984
Hello bakers!

Recently there was a Pull Request on GitHub 
 for adding *German 
documentation* to the Cookbook.

Dereuromark  (CakePHP core developer) and 
rme  (CakePHP docs contributor) are both 
German speaking.
We both don't see a pressing need for a German documentation for the 
CakePHP framework.

We ask all German speaking developers of our community to read the 
discussion in the Pull Request on GitHub 
.
Please give us your opinion and may be your commitment to contribute to the 
German docs.

Thank you and hopefully see you at the CakeFest 2014 !

Greetings from Switzerland
Marc

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


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

2014-08-05 Thread Jipson Thomas
Hi Jose,
Sorry. What I said in my last thread that I re created my models ,views and 
controllers through bake (The code I pasted in an older thread was not from 
bake command.). The form created through bake doesn't include the user 
table inputs. I will paste the code of form generated through bake below.
===


Form->create($vendor); ?>


Form->input('company_name');
echo $this->Form->input('logo_url');
echo $this->Form->input('email_domain');
echo $this->Form->input('phone');
echo $this->Form->input('fax');
echo $this->Form->input('website');
echo $this->Form->input('address');
echo $this->Form->input('country');
echo $this->Form->input('city');
echo $this->Form->input('state');
echo $this->Form->input('postalcode');
echo $this->Form->input('subscription_package');
echo $this->Form->input('status');
echo $this->Form->input('no_emails');
echo $this->Form->input('no_partners');
echo $this->Form->input('coupon_id');
echo $this->Form->input('language');
?>

Form->button(__('Submit')); ?>
Form->end(); ?>




Html->link(__('List Vendors'), ['action' => 
'index']); ?>
Html->link(__('List Coupons'), ['controller' => 
'Coupons', 'action' => 'index']); ?> 
Html->link(__('New Coupon'), ['controller' => 
'Coupons', 'action' => 'add']); ?> 
Html->link(__('List Partners'), ['controller' => 
'Partners', 'action' => 'index']); ?> 
Html->link(__('New Partner'), ['controller' => 
'Partners', 'action' => 'add']); ?> 
Html->link(__('List VendorManagers'), ['controller' 
=> 'VendorManagers', 'action' => 'index']); ?> 
Html->link(__('New Vendor Manager'), ['controller' 
=> 'VendorManagers', 'action' => 'add']); ?> 



==

The above code is to create separate forms for each table. My requirement 
is to make a single signup form for all the 3 tables.

Apologize to be a continuing burdan...

Regards,
Jipson


On Tuesday, 5 August 2014 10:11:36 UTC+1, José Lorenzo wrote:
>
> I find hard to believe that the form you showed above was generated by 
> bake, but I can definitely look if there is any errors in the bake tool. 
> The reason I say that is that we are not using the 'UppercaseThing.field' 
> notation anymore, we use lowercase properties.
> For example if Articles belongsTo Authors the form would look like:
>
>  Form->input('title') ?>
>  Form->input('author.name') ?>
>  Form->input('author.email') ?>
>
> On Tuesday, August 5, 2014 10:48:56 AM UTC+2, Jipson Thomas wrote:
>>
>> Hi Jose,
>> Yes , I did the controller, model and view creation through the bake 
>> console. But it is not helping me to save data from single form to multiple 
>> tables. In my case the vendor signup form is having the input  fields to 
>> vendor table, vendor manager table and a user table. Would you please help 
>> me to find a solution on this?
>>
>> Regards,
>> Jipson
>>
>> On Monday, 4 August 2014 18:26:48 UTC+1, José Lorenzo wrote:
>>>
>>> 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 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 = [
 new 
 VendorManager($this->request->data['VendorManager']),
 ];
 $vendor->Users = [
 new User($this->request->data['User']),
 ];
 //print_r($vendor);
 if ($vendors->save($vendor)) {
 $this->Flash->success(__('The vendor has been saved'));
 return $this->redirect(['action' => 'index']);
 }
 $this->Flash->error(__('Unable to add the vendor'));
 }
 $this->set('vendor', $vendor);
 $this->set('subscription_package', $id);
 $this->set('subscription_type', $payoption);

 On Monday, 4 August 2014 16:17:10 UTC+1, Jipson Thomas wrote:
>
> 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 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-05 Thread José Lorenzo
I find hard to believe that the form you showed above was generated by 
bake, but I can definitely look if there is any errors in the bake tool. 
The reason I say that is that we are not using the 'UppercaseThing.field' 
notation anymore, we use lowercase properties.
For example if Articles belongsTo Authors the form would look like:

 Form->input('title') ?>
 Form->input('author.name') ?>
 Form->input('author.email') ?>

On Tuesday, August 5, 2014 10:48:56 AM UTC+2, Jipson Thomas wrote:
>
> Hi Jose,
> Yes , I did the controller, model and view creation through the bake 
> console. But it is not helping me to save data from single form to multiple 
> tables. In my case the vendor signup form is having the input  fields to 
> vendor table, vendor manager table and a user table. Would you please help 
> me to find a solution on this?
>
> Regards,
> Jipson
>
> On Monday, 4 August 2014 18:26:48 UTC+1, José Lorenzo wrote:
>>
>> 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 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 = [
>>> new VendorManager($this->request->data['VendorManager']),
>>> ];
>>> $vendor->Users = [
>>> new User($this->request->data['User']),
>>> ];
>>> //print_r($vendor);
>>> if ($vendors->save($vendor)) {
>>> $this->Flash->success(__('The vendor has been saved'));
>>> return $this->redirect(['action' => 'index']);
>>> }
>>> $this->Flash->error(__('Unable to add the vendor'));
>>> }
>>> $this->set('vendor', $vendor);
>>> $this->set('subscription_package', $id);
>>> $this->set('subscription_type', $payoption);
>>>
>>> On Monday, 4 August 2014 16:17:10 UTC+1, Jipson Thomas wrote:

 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 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 fix this
>
> Regards,
> Jipson
>


-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Issue with Options page Using cakephp 2.5.2

2014-08-05 Thread raji gudivada
Hi
I am trying to develop Content Management System using cakephp. I 
developed Chapters page Quizzes page Now i need to develop Options 
page.Please find the attached screenshot and i need to develop options page 
like that.  Please help me

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


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

2014-08-05 Thread Jipson Thomas
Hi Jose,
Yes , I did the controller, model and view creation through the bake 
console. But it is not helping me to save data from single form to multiple 
tables. In my case the vendor signup form is having the input  fields to 
vendor table, vendor manager table and a user table. Would you please help 
me to find a solution on this?

Regards,
Jipson

On Monday, 4 August 2014 18:26:48 UTC+1, José Lorenzo wrote:
>
> 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 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 = [
>> new VendorManager($this->request->data['VendorManager']),
>> ];
>> $vendor->Users = [
>> new User($this->request->data['User']),
>> ];
>> //print_r($vendor);
>> if ($vendors->save($vendor)) {
>> $this->Flash->success(__('The vendor has been saved'));
>> return $this->redirect(['action' => 'index']);
>> }
>> $this->Flash->error(__('Unable to add the vendor'));
>> }
>> $this->set('vendor', $vendor);
>> $this->set('subscription_package', $id);
>> $this->set('subscription_type', $payoption);
>>
>> On Monday, 4 August 2014 16:17:10 UTC+1, Jipson Thomas wrote:
>>>
>>> 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 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 fix this

 Regards,
 Jipson

>>>

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cant use email as login cakephp

2014-08-05 Thread ajt
This function wont work as I get no output

 public function isAuthorized($user) {
// Admin can access every action
debug($user['role']);
debug("asdd");

>
>
>

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cant use email as login cakephp

2014-08-05 Thread ajt

the problem is that I can log in with any user when I shouldnt. if the user 
isnt admin it will still access admin only webpages.


-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cant use email as login cakephp

2014-08-05 Thread José Lorenzo
the problem is that you are not able to log in?

On Tuesday, August 5, 2014 5:38:45 AM UTC+2, ajt wrote:
>
> 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 website 
> and it works fine. I looked at the code from the docs and really couldnt 
> see the issue. The fields in the users table have role, email,password. 
> Since the same code worked elsewhere without email for username then I am 
> stuck on what to do as i checked how you add email as username in 
> $components.
>
> I have a user with a role called teacher that always logs in when it 
> shouldnt and I have simple password enabled. I checked email and role 
> values in database and all is as expected.
>
>
> http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html
>
>  public $components = array(
>  "Email",
> 'Session',
> 'Auth' => array(
> 'loginRedirect' => array('controller' => 'users', 'action' => 
> 'dashboard'),
> 'logoutRedirect' => array('controller' => 'users','action' => 'login' 
>  ),
>  'authenticate' => array( 'Form' => array('fields' => 
> array('username' => 'email') ,
>  'authorize' => array('Controller') // Added this line
> ;
>
>
> public function isAuthorized($user) {
> // Admin can access every action
> debug($user['role']);  NO output
> debug("asdd"); NO output
>
> if (isset($user['role']) && $user['role'] === 'admin') {
> return true;
> }
>
> // Default deny
> return false;
> } 
>
>

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: How to get last insert id in cakePHP 3

2014-08-05 Thread Jipson Thomas
Thank you Mark

On Monday, 4 August 2014 18:17:18 UTC+1, euromark wrote:
>
> 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 the last insert id in cake php 
>> 3. 
>> The save() is returning Boolean value only.Is there any option to get the 
>> last insert id value?
>>
>> Regards,
>> Jipson
>>
>

-- 
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 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.