Re: Extending FormHelper causes error in it

2014-06-07 Thread John Andersen
Can I assume that your code is in your LanguageHelper and that the code is 
in a specific method and not in an overridden method of the FormHelper?

How are you using the LanguageHelper?
How are you calling the method in the view?

Have you tried to minimize the code in your method, so as to ensure that it 
works without your code?

Enjoy, John

On Saturday, 7 June 2014 21:32:34 UTC+3, Sven Mäurer wrote:
>
> Hello John,
>
> I still get the same error.
>
> Greets,
> Sven
>
> [snip]
>

-- 
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: Extending FormHelper causes error in it

2014-06-07 Thread Sven Mäurer
Hello John,

I still get the same error.

Greets,
Sven

Am Samstag, 7. Juni 2014 19:49:05 UTC+2 schrieb John Andersen:
>
> Thanks for the code. I assume that you have extended the FormHelper by 
> defining your own LanguageHelper, thus your LanguageHelper is the same as 
> the FormHelper with your additions.
>
> If the above is correct, then you should change the parent::input and 
> parent::output calls to $this->input and $this->output as they are already 
> a part of your LanguageHelper by inheritance. Please try and change your 
> code accordingly and kindly inform us of the result.
>
> Enjoy, John
>
> On Friday, 6 June 2014 09:32:27 UTC+3, Sven Mäurer wrote:
>>
>> This is the complete method of my LanguageHelper. The two lines should 
>> make the finally output.
>>
>> $options = array_merge(array(
>> 'label' => __('Country', true),
>> 'default' => $this->defaultCountry,
>> 'class' => null
>> ), $options);
>> $selected = $this->getSelected($fieldName);
>> if ($selected === null ||
>> !array_key_exists($selected, $this->countries)) {
>> if ($this->countryCode === null) {
>> $selected = $options['default'];
>> } else {
>> $selected = $this->countryCode;
>> }
>> }
>> $opts = array();
>> $opts['options'] = $this->countries;
>> $opts['selected'] = $selected;
>> $opts['multiple'] = false;
>> $opts['label'] = $options['label'];
>> if ($options['class'] !== null) {
>> $opts['class'] = $options['class'];
>> }
>> $out = parent::input($fieldName, $opts);
>> return parent::output($out);
>>
>

-- 
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: Extending FormHelper causes error in it

2014-06-07 Thread John Andersen
Thanks for the code. I assume that you have extended the FormHelper by 
defining your own LanguageHelper, thus your LanguageHelper is the same as 
the FormHelper with your additions.

If the above is correct, then you should change the parent::input and 
parent::output calls to $this->input and $this->output as they are already 
a part of your LanguageHelper by inheritance. Please try and change your 
code accordingly and kindly inform us of the result.

Enjoy, John

On Friday, 6 June 2014 09:32:27 UTC+3, Sven Mäurer wrote:
>
> This is the complete method of my LanguageHelper. The two lines should 
> make the finally output.
>
> $options = array_merge(array(
> 'label' => __('Country', true),
> 'default' => $this->defaultCountry,
> 'class' => null
> ), $options);
> $selected = $this->getSelected($fieldName);
> if ($selected === null ||
> !array_key_exists($selected, $this->countries)) {
> if ($this->countryCode === null) {
> $selected = $options['default'];
> } else {
> $selected = $this->countryCode;
> }
> }
> $opts = array();
> $opts['options'] = $this->countries;
> $opts['selected'] = $selected;
> $opts['multiple'] = false;
> $opts['label'] = $options['label'];
> if ($options['class'] !== null) {
> $opts['class'] = $options['class'];
> }
> $out = parent::input($fieldName, $opts);
> return parent::output($out);
>

-- 
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.


cant set php env variable wth easyphp for cakephp console

2014-06-07 Thread ajt


Hi, 

I am trying to setup cake console in win7 and run cake bake as in the link 
below.I set up the env variable in win7 as below with a php and cakeapp 
entry in this Path.I have easyPHP 12.1 and php works fine. I get an error 
with php in failing to load. dynamic library but the php dir is in the path 
below so I have no idea .

I cant set my php env var is my problem . The php.ini is in this dir 
specified below.

http://www.nurelm.com/themanual/2012/01/30/running-cakephp-command-line-tools-in-windows/

E:\Program Files\EasyPHP-12.1\php\php546x121019214357\;E:\AA-website 
design\acl\app\Console\; 
There is a link here to the same issue but I didt understand the answer as 
there is no Path set in php.ini? 

-- 
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.