Re: unidentified index

2014-08-26 Thread 'Dallas' via CakePHP
Hello Stephan,
Thank you this is helpful.  

On Tuesday, August 26, 2014 1:50:04 PM UTC-4, Dallas wrote:
>
> In migrating from 1.2.5 to 2.5.3 I am getting undefined index for input of 
> name, business name, phone and email.  I updated form as much as possible - 
> but if I use DataHelper - I can no longer use array - is there a quick way 
> to fix this using *isset() **or do i need to rewrite - here is the code: 
> - Thank you*
> echo '';
> echo $this->Form->create(null, array('url' => $loc)); 
> echo $this->Form->hidden('adv_form', array('value' => 'adv_form'));
> echo $this->Form->input('name', array('type'=>'text', 
> 'value'=>$this->data['name'], 'label'=>'', 'after'=>'Contact Name'));
> if(array_key_exists('name', $this->Errors)){echo 
> $this->Errors['name'];}
> echo $this->Form->input('business_name', array('type'=>'text', 
> 'value'=>$this->data['business_name'], 'label'=>'', 'after'=>'Business 
> Name'));
> echo $this->Form->input('phone', array('type'=>'text', 
> 'value'=>$this->data['phone'], 'label'=>'', 'after'=>'Phone Number'));
> if(array_key_exists('phone', $this->Errors)){echo 
> $this->Errors['phone'];}
> echo $this->Form->input('email', array('type'=>'text', 
> 'value'=>$this->data['email'], 'label'=>'', 'after'=>'e-mail'));
> if(array_key_exists('email', $this->Errors)){echo 
> $this->Errors['email'];}
> echo $this->Form->submit('add.gif');
> echo $this->Form->end();
> 
> if($msg != '')
> {
> echo '';
> echo $msg;
> echo '';
> }
> echo '';
> ?>
>

-- 
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: CAKEPHP Image slider and Menu

2014-08-26 Thread Stephen S
You'd do this with Javascript / jQuery, not sure what you mean by menu.
Most solutions for any web projects should be sufficient, a quick google
will show you results i.e. jQuery Carousel.


On 26 August 2014 19:26, papalifegr  wrote:

> Hello Community,
>
> I am looking for an Image Slider and Menu for my Project based on CAKEPHP.
> Could someone give me solution ?
>
> 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.
>



-- 
Kind Regards
 Stephen Speakman

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


CAKEPHP Image slider and Menu

2014-08-26 Thread papalifegr
Hello Community,

I am looking for an Image Slider and Menu for my Project based on CAKEPHP. 
Could someone give me solution ?

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.


Re: migration issue

2014-08-26 Thread Stephen S
Also your index method is outside of your class, is this deliberate?


On 26 August 2014 19:48, Stephen S  wrote:

> It doesn't look like you're using the request handler in this controller
> or the construct method, why not remove both? CakePHP 2.x controllers don't
> really need to use construct, beforeFilter is usually more than sufficient.
>
> Hope this helps
>
>
> On 26 August 2014 17:31, 'Dallas' via CakePHP 
> wrote:
>
>> Andras,
>> Thank you, but I already changed this per the stackflow post, and I am
>> still getting the error.  I will keep searching.
>> D
>>
>>
>> On Saturday, August 23, 2014 5:47:08 PM UTC-4, Dallas wrote:
>>
>>> does anyone know how this should be
>>>
>>> image('index_01.jpg'));?>
>>>
>>> and
>>>css('shark')); ?>
>>>
>>> shark being my stylesheet.  when I removed the above css line, my
>>> background came up.  So I do not know if I no longer need these lines or if
>>> the language has changed. They were calling for undefined functions in the
>>> error messages.
>>>
>>> Thanks for any help
>>>
>>  --
>> 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.
>>
>
>
>
> --
> Kind Regards
>  Stephen Speakman
>



-- 
Kind Regards
 Stephen Speakman

-- 
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: migration issue

2014-08-26 Thread Stephen S
It doesn't look like you're using the request handler in this controller or
the construct method, why not remove both? CakePHP 2.x controllers don't
really need to use construct, beforeFilter is usually more than sufficient.

Hope this helps


On 26 August 2014 17:31, 'Dallas' via CakePHP 
wrote:

> Andras,
> Thank you, but I already changed this per the stackflow post, and I am
> still getting the error.  I will keep searching.
> D
>
>
> On Saturday, August 23, 2014 5:47:08 PM UTC-4, Dallas wrote:
>
>> does anyone know how this should be
>>
>> image('index_01.jpg'));?>
>>
>> and
>>css('shark')); ?>
>>
>> shark being my stylesheet.  when I removed the above css line, my
>> background came up.  So I do not know if I no longer need these lines or if
>> the language has changed. They were calling for undefined functions in the
>> error messages.
>>
>> Thanks for any help
>>
>  --
> 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.
>



-- 
Kind Regards
 Stephen Speakman

-- 
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: unidentified index

2014-08-26 Thread Stephen S
You don't need to set the value in the input, instead you can do it from
the controller.

if($this->request->is('post')) {
// Logic to process the form submission
} else {
$this->request->data = $this->Model->read(null, $id);
}

Change this part "echo $this->Form->create(null, array('url' => $loc));" to
contain the model name, for example if this form is for the User model, do
the following "echo $this->Form->create('User', array('url' => $loc));"

Alternatively you can specify the model in the input like such:

echo $this->Form->input('User.email', array('type'=>'text', 'label'=>'',
'after'=>'e-mail'));


On 26 August 2014 18:50, 'Dallas' via CakePHP 
wrote:

> In migrating from 1.2.5 to 2.5.3 I am getting undefined index for input of
> name, business name, phone and email.  I updated form as much as possible -
> but if I use DataHelper - I can no longer use array - is there a quick way
> to fix this using *isset() **or do i need to rewrite - here is the code:
> - Thank you*
> echo '';
> echo $this->Form->create(null, array('url' => $loc));
> echo $this->Form->hidden('adv_form', array('value' => 'adv_form'));
> echo $this->Form->input('name', array('type'=>'text',
> 'value'=>$this->data['name'], 'label'=>'', 'after'=>'Contact Name'));
> if(array_key_exists('name', $this->Errors)){echo
> $this->Errors['name'];}
> echo $this->Form->input('business_name', array('type'=>'text',
> 'value'=>$this->data['business_name'], 'label'=>'', 'after'=>'Business
> Name'));
> echo $this->Form->input('phone', array('type'=>'text',
> 'value'=>$this->data['phone'], 'label'=>'', 'after'=>'Phone Number'));
> if(array_key_exists('phone', $this->Errors)){echo
> $this->Errors['phone'];}
> echo $this->Form->input('email', array('type'=>'text',
> 'value'=>$this->data['email'], 'label'=>'', 'after'=>'e-mail'));
> if(array_key_exists('email', $this->Errors)){echo
> $this->Errors['email'];}
> echo $this->Form->submit('add.gif');
> echo $this->Form->end();
>
> if($msg != '')
> {
> echo '';
> echo $msg;
> echo '';
> }
> echo '';
> ?>
>
> --
> 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.
>



-- 
Kind Regards
 Stephen Speakman

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


unidentified index

2014-08-26 Thread 'Dallas' via CakePHP
In migrating from 1.2.5 to 2.5.3 I am getting undefined index for input of 
name, business name, phone and email.  I updated form as much as possible - 
but if I use DataHelper - I can no longer use array - is there a quick way 
to fix this using *isset() **or do i need to rewrite - here is the code: - 
Thank you*
echo '';
echo $this->Form->create(null, array('url' => $loc)); 
echo $this->Form->hidden('adv_form', array('value' => 'adv_form'));
echo $this->Form->input('name', array('type'=>'text', 
'value'=>$this->data['name'], 'label'=>'', 'after'=>'Contact Name'));
if(array_key_exists('name', $this->Errors)){echo $this->Errors['name'];}
echo $this->Form->input('business_name', array('type'=>'text', 
'value'=>$this->data['business_name'], 'label'=>'', 'after'=>'Business 
Name'));
echo $this->Form->input('phone', array('type'=>'text', 
'value'=>$this->data['phone'], 'label'=>'', 'after'=>'Phone Number'));
if(array_key_exists('phone', $this->Errors)){echo 
$this->Errors['phone'];}
echo $this->Form->input('email', array('type'=>'text', 
'value'=>$this->data['email'], 'label'=>'', 'after'=>'e-mail'));
if(array_key_exists('email', $this->Errors)){echo 
$this->Errors['email'];}
echo $this->Form->submit('add.gif');
echo $this->Form->end();

if($msg != '')
{
echo '';
echo $msg;
echo '';
}
echo '';
?>

-- 
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: migration issue

2014-08-26 Thread 'Dallas' via CakePHP
Andras,
Thank you, but I already changed this per the stackflow post, and I am 
still getting the error.  I will keep searching.
D

On Saturday, August 23, 2014 5:47:08 PM UTC-4, Dallas wrote:
>
> does anyone know how this should be 
>
> image('index_01.jpg'));?>
>
> and 
>css('shark')); ?>
>
> shark being my stylesheet.  when I removed the above css line, my 
> background came up.  So I do not know if I no longer need these lines or if 
> the language has changed. They were calling for undefined functions in the 
> error messages.
>
> Thanks for any help
>

-- 
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: CakePHP 3.0 - Get data from event subject

2014-08-26 Thread Dr. Tarique Sani
Thanks $event->data does the trick, $entity as second argument does not
appear with Id hydrated.

Cheers
Tarique


On Tue, Aug 26, 2014 at 6:08 PM, José Lorenzo  wrote:

> You probably want to use $event->data instead. Also, remember that
> listeners get the data as arguments, so if you want the entity Id add the
> $entity as the second argument of the function.
>
>
> On Tuesday, August 26, 2014 2:00:49 PM UTC+2, Dr. Tarique Sani wrote:
>>
>> Trying something very simple here
>>
>> In my Listener I am trying to get
>>
>> $event->subject()->id
>>
>> but I keep getting  Table "App\Model\Table\PostsTable" is not associated
>> with "id"
>>
>> What am I missing here?
>>
>> Tarique
>>
>>
>> --
>> =
>> Hire a CakePHP dev team : http://sanisoft.com
>> =
>>
>  --
> 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.
>



-- 
=
Hire a CakePHP dev team : http://sanisoft.com
=

-- 
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: CakePHP 3.0 - Get data from event subject

2014-08-26 Thread José Lorenzo
You probably want to use $event->data instead. Also, remember that 
listeners get the data as arguments, so if you want the entity Id add the 
$entity as the second argument of the function.

On Tuesday, August 26, 2014 2:00:49 PM UTC+2, Dr. Tarique Sani wrote:
>
> Trying something very simple here 
>
> In my Listener I am trying to get 
>
> $event->subject()->id
>
> but I keep getting  Table "App\Model\Table\PostsTable" is not associated 
> with "id"
>
> What am I missing here?
>
> Tarique
>
>
> -- 
> =
> Hire a CakePHP dev team : http://sanisoft.com
> =
>  

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


CakePHP 3.0 - Get data from event subject

2014-08-26 Thread Dr. Tarique Sani
Trying something very simple here

In my Listener I am trying to get

$event->subject()->id

but I keep getting  Table "App\Model\Table\PostsTable" is not associated
with "id"

What am I missing here?

Tarique


-- 
=
Hire a CakePHP dev team : http://sanisoft.com
=

-- 
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: CakePHP 3.0 orm query question

2014-08-26 Thread Andras Kende
Hi Jose,

I got it working as :

$query = $this->find('all', array(
'limit' => 200,
'order' => array(
'distance' => 'ASC',
'name' => 'ASC',
),
'conditions' => $conditions,
'fields' => ["name", "slug", "lat", "lng", "address", 
"city", "state", "postal_code", "phone", "distance" => "TRUNCATE((3958 * 
3.1415926 * SQRT((`lat` - {$lat}) * (`lat` - {$lat}) + COS(`lat` / 57.29578) * 
COS({$lat} / 57.29578) * (`lng` - {$lng}) * (`lng` - {$lng})) / 180) * {$unit}, 
5)"],
'having' => "distance <= $distance",
));

Just needed to use associative array, in the fields..  


Thanks,

Andras

On Aug 26, 2014, at 1:10 AM, José Lorenzo  wrote:

> $query = $table->find()
> $query->select(['distance' => $query->newExpr($rawSQL)])->having(['distance 
> <=' => $distance])
> 
> On Monday, August 25, 2014 2:59:01 AM UTC+2, Andras Kende wrote:
> Hello,
> 
> Im trying to convert this geolocator query from 2.5 to 3.0 orm but no luck so 
> far.
> 
> CakePHP 2.5, this works fine:
> 
> $results = $this->find('all', array(
>   'limit' => 200,
>   'order' => array(
>   'distance' => 'ASC',
>   'name' => 'ASC',
>   ),
>   'recursive' => -1,
>   'conditions' => "HAVING distance < $distance",
>   'fields' => "*, TRUNCATE((3958 * 3.1415926 * SQRT((`lat` - {$lat}) * 
> (`lat` - {$lat}) + COS(`lat` / 57.29578) * COS({$lat} / 57.29578) * (`lng` - 
> {$lng}) * (`lng` - {$lng})) / 180) * {$unit}, 5)  AS `distance`"
> ));
> 
> generated sql statement:
> 
> SELECT *, TRUNCATE((3958 * 3.1415926 * SQRT((`lat` - 34.0522) * (`lat` - 
> 34.0522) + COS(`lat` / 57.29578) * COS(34.0522 / 57.29578) * (`lng` - 
> -118.244) * (`lng` - -118.244)) / 180) * 1, 5) AS `distance` FROM 
> `hockeypickup`.`locations` AS `Location` HAVING distance < 100 ORDER BY 
> `distance` ASC, `name` ASC LIMIT 200
> 
> 
> on CakePHP 3.0 this is far as I got :
> 
> $query = $this->find('all', array(
>   'limit' => 200,
>   'order' => array(
>   // 'distance' => 'ASC',
>   'name' => 'ASC',
>   ),
>   'conditions' => $conditions,
>   'select' => "*, TRUNCATE((3958 * 3.1415926 * SQRT((`lat` - {$lat}) * 
> (`lat` - {$lat}) + COS(`lat` / 57.29578) * COS({$lat} / 57.29578) * (`lng` - 
> {$lng}) * (`lng` - {$lng})) / 180) * {$unit}, 5) AS Locations.distance",
>   // 'having' => "`distance` <= $distance",
> ));
> 
> distance is not getting recognized so far...
> 
> 
> Thank you,
> 
> Andras
> 
> -- 
> 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: CakePHP 3.0.0-beta1 released

2014-08-26 Thread Dr. Tarique Sani
Thanks. Console/Command to Shell would be logical. After convincing a
client to use v3 It is difficult to explain why composer update broke
everything or anything ;-)

T


On Tue, Aug 26, 2014 at 1:38 PM, José Lorenzo  wrote:

> You can expect that. We have no plans to change the current API unless we
> found bugs or problems that would impede a happy future for this version.
> The on;y directory change that you can expect is that we are moving
> Console/Command to just Shell
>
> On Monday, August 25, 2014 5:17:58 AM UTC+2, Dr. Tarique Sani wrote:
>>
>> Great! Now that we are beta can we presume there will be no more
>> directory changes and no more function signature changes? In other words
>> can we start building stuff now?
>>
>> Cheers
>> Tarique
>>
>>
>> On Sat, Aug 23, 2014 at 3:26 PM, José Lorenzo  wrote:
>>
>>> The CakePHP core team is excited to announce the first beta release of
>>> CakePHP 3.0.0. In the weeks since 3.0.0-alpha2, we've been hard at work
>>> incorporating community feedback on the new release, and completing the
>>> remaining changes that will break compatibility in a significant way.
>>> Breaking Changes since 3.0.0-alpha2
>>>
>>> Since the release of 3.0.0-alpha2 there have been several changes that
>>> will break compatibility with existing applications.
>>> I18n has been re-implemented
>>>
>>> Built on top of ext/intl and Aura/Intl the new localization subsystem
>>> offers more powerful replacement syntax, and retains a backwards compatible
>>> sprintf() based formatter. Consult the new i18n documentation
>>> 
>>>  for
>>> more information. The L10n class has been removed.
>>> NumberHelper uses intl now
>>>
>>> The Number library and NumberHelper now use intl internally for
>>> formatting currencies and values. This makes NumberHelper completely aware
>>> of the application's current locale. The addFormat() method has been
>>> removed.
>>> Directory layout changes
>>>
>>> More changes to the directory layout of a CakePHP application have been
>>> made:
>>>
>>>- src/Config is now /config .
>>>- src/bootstrap.php is now /config/bootstrap.php .
>>>- Log files are now in a top level directory by default. Having them
>>>mixed in with other actually temporary data sometimes resulted in people
>>>accidentally deleting their log files.
>>>- Bake templates should now be put in src/Template/Bake .
>>>
>>> Vendor Prefixed Plugins Have Changed
>>>
>>> Plugins that use vendor prefixes e.g: ( AcmeCorp\Users ) are no longer
>>> renamed. Instead of using Users.User , you must now use
>>> AcmeCorp/Users.User . Additionally the vendor prefix will be used as
>>> folder name in the plugins folder, so the plugin will be installed in
>>> plugins/AcmeCorp/Users folder.
>>> Methods removed
>>>
>>>- Many of the infrequently used methods defined in basics.php have
>>>been removed. Functions like config() no longer exist.
>>>- Validation::ssn() has been removed.
>>>- Support for CASE statements has been added to the ORM.
>>>- Helper::webroot(), Helper::assetUrl(), Helper::assetTimestamp()
>>>have been moved to a UrlHelper. This allows you to easily replace the URL
>>>building features in each of your helpers. You will need to add Url to
>>>the $helpers list in your helpers.
>>>- App::objects() has been removed.
>>>
>>> We hope to minimize the impact of breaking changes in future beta and
>>> release candidate releases.
>>> New features in 3.0.0-beta1
>>>
>>>- Improved error pages for plugins.
>>>- Numerous bugs have been fixed in the ORM and across the framework.
>>>- Cookie paths are now set to the application's base directory by
>>>default.
>>>- Query objects can be json serialized now.
>>>- Shell::param() was added.
>>>- Added a new collection() global shorthand function to convert
>>>arrays to collections.
>>>- Many API documentation blocks and book sections have been improved.
>>>- Multiple optimizations for performance.
>>>
>>> For more details on all the changes in 3.0.0, you can consult the migration
>>> guide
>>> .
>>> In closing, we'd like to thank all of the people that have helped so far
>>> with the 3.0 release. We've made great progress and without your help we
>>> wouldn't be here today.
>>>
>>> Download a packaged release
>>> .
>>>
>>> --
>>> 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://g

Re: CakePHP 3.0 orm query question

2014-08-26 Thread José Lorenzo
$query = $table->find()
$query->select(['distance' => $query->newExpr($rawSQL)])->having(['distance 
<=' => $distance])

On Monday, August 25, 2014 2:59:01 AM UTC+2, Andras Kende wrote:
>
> Hello,
>
> Im trying to convert this geolocator query from 2.5 to 3.0 orm but no luck 
> so far.
>
> CakePHP 2.5, this works fine:
>
> $results = $this->find('all', array(
> 'limit' => 200,
> 'order' => array(
> 'distance' => 'ASC',
> 'name' => 'ASC',
> ),
> 'recursive' => -1,
> 'conditions' => "HAVING distance < $distance",
> ‘fields' => "*, TRUNCATE((3958 * 3.1415926 * SQRT((`lat` - {$lat}) * 
> (`lat` - {$lat}) + COS(`lat` / 57.29578) * COS({$lat} / 57.29578) * (`lng` 
> - {$lng}) * (`lng` - {$lng})) / 180) * {$unit}, 5)  AS `distance`"
> ));
>
> generated sql statement:
>
> SELECT *, TRUNCATE((3958 * 3.1415926 * SQRT((`lat` - 34.0522) * (`lat` - 
> 34.0522) + COS(`lat` / 57.29578) * COS(34.0522 / 57.29578) * (`lng` - 
> -118.244) * (`lng` - -118.244)) / 180) * 1, 5) AS `distance` FROM 
> `hockeypickup`.`locations` AS `Location` HAVING distance < 100 ORDER BY 
> `distance` ASC, `name` ASC LIMIT 200
>
>
> on CakePHP 3.0 this is far as I got :
>
> $query = $this->find('all', array(
> 'limit' => 200,
> 'order' => array(
> // 'distance' => 'ASC',
> 'name' => 'ASC',
> ),
> 'conditions' => $conditions,
> 'select' => "*, TRUNCATE((3958 * 3.1415926 * SQRT((`lat` - {$lat}) * 
> (`lat` - {$lat}) + COS(`lat` / 57.29578) * COS({$lat} / 57.29578) * (`lng` 
> - {$lng}) * (`lng` - {$lng})) / 180) * {$unit}, 5) AS Locations.distance",
> // 'having' => "`distance` <= $distance",
> ));
>
> distance is not getting recognized so far…
>
>
> Thank you,
>
> Andras
>

-- 
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: CakePHP 3.0.0-beta1 released

2014-08-26 Thread José Lorenzo
You can expect that. We have no plans to change the current API unless we 
found bugs or problems that would impede a happy future for this version. 
The on;y directory change that you can expect is that we are moving 
Console/Command to just Shell

On Monday, August 25, 2014 5:17:58 AM UTC+2, Dr. Tarique Sani wrote:
>
> Great! Now that we are beta can we presume there will be no more directory 
> changes and no more function signature changes? In other words can we start 
> building stuff now?
>
> Cheers
> Tarique 
>
>
> On Sat, Aug 23, 2014 at 3:26 PM, José Lorenzo  wrote:
>
>> The CakePHP core team is excited to announce the first beta release of 
>> CakePHP 3.0.0. In the weeks since 3.0.0-alpha2, we've been hard at work 
>> incorporating community feedback on the new release, and completing the 
>> remaining changes that will break compatibility in a significant way.
>> Breaking Changes since 3.0.0-alpha2
>>
>> Since the release of 3.0.0-alpha2 there have been several changes that 
>> will break compatibility with existing applications.
>> I18n has been re-implemented
>>
>> Built on top of ext/intl and Aura/Intl the new localization subsystem 
>> offers more powerful replacement syntax, and retains a backwards compatible 
>> sprintf() based formatter. Consult the new i18n documentation 
>> 
>>  for 
>> more information. The L10n class has been removed.
>> NumberHelper uses intl now
>>
>> The Number library and NumberHelper now use intl internally for 
>> formatting currencies and values. This makes NumberHelper completely aware 
>> of the application's current locale. The addFormat() method has been 
>> removed.
>> Directory layout changes
>>
>> More changes to the directory layout of a CakePHP application have been 
>> made:
>>
>>- src/Config is now /config . 
>>- src/bootstrap.php is now /config/bootstrap.php . 
>>- Log files are now in a top level directory by default. Having them 
>>mixed in with other actually temporary data sometimes resulted in people 
>>accidentally deleting their log files. 
>>- Bake templates should now be put in src/Template/Bake . 
>>
>> Vendor Prefixed Plugins Have Changed
>>
>> Plugins that use vendor prefixes e.g: ( AcmeCorp\Users ) are no longer 
>> renamed. Instead of using Users.User , you must now use 
>> AcmeCorp/Users.User . Additionally the vendor prefix will be used as 
>> folder name in the plugins folder, so the plugin will be installed in 
>> plugins/AcmeCorp/Users folder.
>> Methods removed
>>
>>- Many of the infrequently used methods defined in basics.php have 
>>been removed. Functions like config() no longer exist. 
>>- Validation::ssn() has been removed. 
>>- Support for CASE statements has been added to the ORM. 
>>- Helper::webroot(), Helper::assetUrl(), Helper::assetTimestamp() 
>>have been moved to a UrlHelper. This allows you to easily replace the URL 
>>building features in each of your helpers. You will need to add Url to 
>>the $helpers list in your helpers. 
>>- App::objects() has been removed. 
>>
>> We hope to minimize the impact of breaking changes in future beta and 
>> release candidate releases.
>> New features in 3.0.0-beta1
>>
>>- Improved error pages for plugins. 
>>- Numerous bugs have been fixed in the ORM and across the framework. 
>>- Cookie paths are now set to the application's base directory by 
>>default. 
>>- Query objects can be json serialized now. 
>>- Shell::param() was added. 
>>- Added a new collection() global shorthand function to convert 
>>arrays to collections. 
>>- Many API documentation blocks and book sections have been improved. 
>>- Multiple optimizations for performance. 
>>
>> For more details on all the changes in 3.0.0, you can consult the migration 
>> guide 
>> . In 
>> closing, we'd like to thank all of the people that have helped so far with 
>> the 3.0 release. We've made great progress and without your help we 
>> wouldn't be here today.
>>
>> Download a packaged release 
>> .
>>  
>> -- 
>> 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.
>>
>
>
>
> -- 
> =
> Hire a CakePHP dev team : http://sanisoft.com
> =

load model from another module

2014-08-26 Thread Hasrul Mikael
Hai,
I'm new in CakePHP. Currently I got a problem in my task. 
I had assigned to create a Plugin name UserManagement and Login in 
app/Plugin/
The Plugin UserManagement already has completed. But now I having a problem 
in Plugin Login. Actually I need to use User Model from Plugin 
UserManagement in Plugin Login. However, I don't know how to write a 
scripts and what steps first I should taken? 

I try before, create LoginsController in Controller. But It display an 
error mentioned that I need to create Model first. Infact that, I actually 
plan to use Model from UserManagement.

Please assists. Thank you.
Sorry..my English is bad. TT_TT

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