Hi,
I'm working on a project which creates entries on individual working days
from the start date and the end date selected. I have done the calculation
to get no. of working days between the dates selected, however, i dont have
any idea how will i go about inserting into the DB, taking out
}
please help me. result $event null
thanks
Vào 22:56:08 UTC+7 Thứ Năm, ngày 21 tháng 8 năm 2014, Rob Cowie đã viết:
>
> Hi all. I have read the cakephp book on events in version 3, and I cannot
> seem to get it to work. I am missing a piece of comprehension.
>
&g
Hi guys,
I have question for Cake Events conventions:
$event = new Event('Model.Order.afterPlace', $this, []);
“*Order*” or “*Orders*” ?
I abstract modelAlias using in AppTable:
public function afterSave(\Cake\Event\Event $event, $entity, $options) {
if ($entity-isNew
Hi folks,
How can I attach or dispatch events only for ACOs/AROs?
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
Thanks mark
Looks interesting, will certainly see what else can be done with push.
Hope anyway that our previous text helped with finding a solution.
Enjoy, John
On Saturday, 27 December 2014 22:06:15 UTC+2, euromark wrote:
For a small community application I also still ajax PULL every x
Hi. I am implementing a Message system (ie, user A sends a message to user
B). After user A sends a message to B, I would like to show the number of
unread messages. One way of implementing this is to check for any new
messages on every page refresh. Could I instead use trigger a cakephp
event?
That would not be possible as A's and B's sessions knows nothing of each
other and only are running when a request is processed.
What you could do is to have a small ajax script pulling the unread count
every so often.
Enjoy, John
On Saturday, 27 December 2014 10:01:27 UTC+2, . . wrote:
Hi.
For a small community application I also still ajax PULL every x seconds
for this.
As long as the users stay in a range ( ?) this might very well work
as a (short term) solution.
The state of the art approach would be a PUSH notification service,
though, as described
- here:
Load the class in all requests or have another class acting as an
intermediate that would load the required classes when the event is
triggered
On Friday, November 21, 2014 11:29:15 PM UTC+1, gonzela2006 wrote:
Hi,
I created an event 'Model.User.created' and attached the listener to my
Hi,
I created an event 'Model.User.created' and attached the listener to my
model as you can see below and it is working well
App::uses('AppModel', 'Model');
App::uses('CakeEvent', 'Event');
class User extends AppModel {
public function afterSave($created, $options = array()) {
/core-libraries/events.html#registering-listeners
T
On Thu, Aug 21, 2014 at 9:26 PM, Rob Cowie asbesto...@gmail.com
javascript: wrote:
Hi all. I have read the cakephp book on events in version 3, and I cannot
seem to get it to work. I am missing a piece of comprehension.
I have
-eventManager()-attach($statistics);
See
http://book.cakephp.org/3.0/en/core-libraries/events.html#registering-listeners
T
On Thu, Aug 21, 2014 at 9:26 PM, Rob Cowie asbesto...@gmail.com wrote:
Hi all. I have read the cakephp book on events in version 3, and I
cannot seem to get it to work. I
Hi all. I have read the cakephp book on events in version 3, and I cannot
seem to get it to work. I am missing a piece of comprehension.
I have the event dispatch code in a controller:
$event = new Event('Controller.User.login', $this);
$this-eventManager()-dispatch($event);
and I have
://book.cakephp.org/3.0/en/core-libraries/events.html#registering-listeners
T
On Thu, Aug 21, 2014 at 9:26 PM, Rob Cowie asbestospip...@gmail.com wrote:
Hi all. I have read the cakephp book on events in version 3, and I cannot
seem to get it to work. I am missing a piece of comprehension.
I have
Hi,
I'm new to Cake and I have a challenge.
I'm trying to select an Item from a Combobox and depending on the Selected
Item
I would like to disable or enable another 2 fields.
Everyone talks about ajax but I would like to have an example.
thanks in advance!
--
Like Us on FaceBook
:
I've read that, and it's not 100% great. I was hoping there might be a
tutorial to walk through a basic example of best practices for implementing
events.
I'm very familiar with the book site, I reference it often.
Thanks!
On Wednesday, June 26, 2013 12:32:41 PM UTC-4, John Sposato wrote
I've read that, and it's not 100% great. I was hoping there might be a
tutorial to walk through a basic example of best practices for implementing
events.
I'm very familiar with the book site, I reference it often.
Thanks!
On Wednesday, June 26, 2013 12:32:41 PM UTC-4, John Sposato wrote
http://book.cakephp.org/2.0/en/core-libraries/events.html#events-system
On Wednesday, June 26, 2013 6:32:41 PM UTC+2, John Sposato wrote:
Anyone know of any good tutorials/examples on how to use the event system?
--
This email may contain material that is confidential, privileged
Anyone know of any good tutorials/examples on how to use the event system?
--
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
Hi @phpMagpie,
from my personal point of view, you are doing it right.
Since you were not too much confident about where to attach events to the
EventManager, well, I propose two ways I think, might be cleaner that in
the Controller according to your example.
Method #1:
Use CakePHP bootstrap
Hi again @phpMagpie,
I've just found two better ways to achieve what you wish.
#1
Override the Model implementedEvents method. If you check the CakePHP
Model class code you see that it already implements CakeEventListener
class).
/**
* Returns a list of all events that will fire in the model
transfer my statistics class in CakePHP I found Events System
http://book.cakephp.org/2.0/en/core-libraries/events.html. Below the
point Registering listeners
http://book.cakephp.org/2.0/en/core-libraries/events.html#registering-listeners
a sample statistics class is indicated.
Where can I create
Hello, I've posted this question on the ask cake site last week with
no reply. Hopefully somebody can help.
Trying to implement a code into a new event on a customer site
What happened - the code broke and the widget code does not embed.
What I expected to happen - the widget to embed
Instead of using isAuthorized() just ensure that Auth doesn't allow
the edit action. Pass the Event.id to that action and then test for
the current User.id.
Also, instead of testing the role, just create an admin_edit() action
and let Cake handle authorization.
public function edit($id = null)
{
Hi all
I am fairly new to CakePHP, I am trying to only allow those users who
created an event to be able to edit or delete an event, so I am comparing
the current user id, with the 'user_id' field of the event the current
event (saved when a user creates an event). Any help would be appreciated
Is possible to bind event handlers as wildcards?
For example, the docs shows Model.Name.eventName. I want to perform it at
Model.*.eventName. Is that possible?
--
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message
Ahh thanks for the example.. got it all working now :)
On Sat, Sep 8, 2012 at 3:09 PM, rchavik rcha...@gmail.com wrote:
On Friday, September 7, 2012 10:23:06 PM UTC+7, Greg wrote:
Hi,
I've got a case where I want one helper to raise events on other helpers.
The concept is that plugins
Hi,
I've got a case where I want one helper to raise events on other helpers.
The concept is that plugins can manipulate the output of a MenuHelper by
returning additional menu items at runtime.
Is there a way that I can access an instance of the helper collection and
attach additional callbacks
On Friday, September 7, 2012 10:23:06 PM UTC+7, Greg wrote:
Hi,
I've got a case where I want one helper to raise events on other helpers.
The concept is that plugins can manipulate the output of a MenuHelper by
returning additional menu items at runtime.
Is there a way that I can access
this object at will.
An example of this type of callbacks is JavaScript, an events language, wich
usually don't take in account result values for events but 'false'. If you
want to alter any result you should be modifying an object.
I hope my answer helps understand the resonance we had
I'm wondering if anyone else has come across this: I have a situation in
which I'm dispatching an event with 2.1's event system, and have
multiple listeners for that event. Each listener returns its own set of
data, with the idea being that all of the returned data is compiled into
one set (in
Basically you have two options, one is writing the result property directly on
each listener to push new values on the array as needed, wich is the option I
would recommend.
The other option is to use the ObjectCollection instead of the event sustem and
pass the collectReturn param
--
Our
Thanks. Just curious - why is the result data overwritten in this way?
For me, at least, using the event system to get information from
multiple listeners (as in my situation) was one of the first uses I
thought of, especially since it can replace a bunch of custom stuff I
had written previously.
collecting the result is desired, an it is often
the consequence of a wrong software design. If you want to collect return, pass
an object as parameter and have listeners modify this object at will.
An example of this type of callbacks is JavaScript, an events language, wich
usually don't take
I'm not confident that I know what I am doing with the Events System so I'm
stepping away from it for now till I fully understand the concept of
'decoupled' functions.
I mistakenly started using it thinking the Observer Pattern was a way to
run jobs separate from the main request cycle, i.e
@Ceeram: Thanks for your help in IRC (I guess I just had to get used to IRC)
I fully intend to post my working example, hopefully later today :)
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org
is intended
for didactic purposes only ...
So it made sense to me to start out using 'Registering listeners' as
the documentation states:
Listeners are an alternative, and often cleaner way of registering
callbacks for an event
I think I am going to just carry on coding all my events into my
@phpMagpie a follow up on this subject would be nice ;)
--
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 questions.
To unsubscribe from this group,
Book: http://book.cakephp.org/2.0/en/core-libraries/events.html
Trying to get to grips with one of the new features of CakePHP 2.1. Have
read the above page in the book and want to implement the code shown in the
'Registering Listeners' section but no indication given as to where the
Listeners configured somewhere else, maybe a config file
a comment from code block on cake event doc page
I was thinking that the events are set much like custom error handling
http://book.cakephp.org/2.0/en/development/errors.html
- S
On 30 January 2012 20:32, phpMagpie p
Hi all,
I'm developing a calendar app where some events are recurring on a
daily / weekly / monthly basis, just like what Google Calendar offers.
I'm not quite sure how to design a model structure to support this. Is
there any best practice for this?
Many thanks
Depends on how complex you want the system to be, but I say start by
reading the iCal standard. You might be able to create a data
structure from it.
http://www.ietf.org/rfc/rfc2445.txt
On Oct 22, 8:24 pm, park park@gmail.com wrote:
Hi all,
I'm developing a calendar app where some events
I need help figuring out how to set up my tables or logic or both for
figuring out how to set a 'due date' on events. I have:
'Company' hasMany 'Category', 'User'
'Category' hasMany 'Event'
'Category' belongsTo 'Interval' (rows in the interval table are: days,
months, years, etc.)
'User' hasMany
/auto_complete_item',
array(
'updateElement' = 'function() { return true;
}',
'afterUpdateElement' = 'updateData'
)
);
and here is the javascript to process the events
How to execute events like onmouseover. onchange in an link tag in
cakephp???
Help Me !!!
Thanks
Rocky
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake
$html-link('Link Text','/link/path',array('onmouseover'='alert(You
moused over me!);');
The third argument in Html::link() is the html attributes, onmouseover
stuff can be passed in there.
On Apr 28, 6:55 am, Rocky [EMAIL PROTECTED] wrote:
How to execute events like onmouseover. onchange
It would be so easy as write the events in the attributes:
http://api.cakephp.org/1.2/class_html_helper.html#71ff7f331b08318bc867a4d9057b7d9f
I.e.
$html-link('title','url',array('onmouseover'='javascript:...');
On 28 abr, 07:55, Rocky [EMAIL PROTECTED] wrote:
How to execute events like
PROTECTED] wrote:
How to execute events like onmouseover. onchange in an link tag in
cakephp???
Help Me !!!
Thanks
Rocky
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post
HI,
I am new to cakephp and I want to select a person (by name)in a table
and link it to another table 'events' that will list all events
related to that person.
I want to do it on the same page.
I would like an example of the cakephp code. I can create the tables
in scaffolding but only
On Feb 12, 2008 12:48 PM, jvandal [EMAIL PROTECTED] wrote:
HI,
I am new to cakephp and I want to select a person (by name)in a table
and link it to another table 'events' that will list all events
related to that person.
I want to do it on the same page.
I would like an example
Its likely that you will have to do a lot of work to get any calendar
to display your desired result.
The phpCalendar code is a good place to work but no calendar will
compute repetitions. You will have to create code to get the events
which could possibly occur during the month being displayed
I know how to create a very simple calendar app that let user to post
events:
title
description
category
start_date
end_date
start_hour
end_hour
repetition(dayly-weekly-monthly-yearly)
location_address
email
telephone
fax
Now i need some cool advice from you about which
Hi,
Please help me with ideas how can I make a events reminder with
cakephp. I'm stuck on sending the emails when there is also the
timezone.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post
how can I make a events reminder with
cakephp. I'm stuck on sending the emails when there is also the
timezone.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email
Hello Fellow bakers,
I am trying to combine the Timesheet app from cakeforge with the
hdCalendar plugin. More specifically, i am trying to pass an array of
Tasks to the Events function of the calendar helper, so that I can see
the tasks is in a weekly view. Has anyone been able to get
Using AJAX and onLoad event, we do populating many divs and it
generally takes relatively long time to complete the page loading,
which makes the STOP button indispensable.
The following code generates 9 divs and 9 onLoad events to populate
them. It works great, but once the onLoad events
(http://manual.cakephp.org).The structure of your code for events and news should be very similar.
For additional functionality like pagination (groups of 10 items) someone has developed a pagination component to be used as an add on to applications that will work well.Searching will also
with the Cake basics.
You should be able to start with the blog tutorial in the manual (http://manual.cakephp.org).
The structure of your code for events and news should be very similar.For additional functionality like pagination (groups of 10 items) someone has developed a pagination component to be used
Hello,
I am new to cake, but I am very interested in these two topics. How do
I maintain an events and news list so both can be archived? For
example, I would like to show ten news items at a time. In order of
newest to oldest. I know I can just limit 10 ordered by id, but I would
like
59 matches
Mail list logo