$_component
$_component : string
The name of the component, e.g. net.nehmer.static. Should be used whenever the component's name is required instead of hardcoding it.
Cron handler to report hours from events that have confirmed task links
It gives you an easy to use way of building cron jobs. You should rely only on the two event handlers _on_initialize and execute, which are called by the cron service.
See the main cron service class for details.
$root_event : \org_openpsa_calendar_event_dba
_on_initialize() : boolean
This callback is executed immediately after object construction. You can initialize your class here.
If you return false here, the handler is not executed, the system skips it.
All class members are already initialized when this event handler is called.
Returns true, if initialization was successful, false if anything went wrong.
execute()
Search for events within configured timeframe and if they have confirmed relatedtos to tasks reports hours for each participant (who is task resource) towards said task.
You should use the print_error() helper of this class in case you need to notify the user of any errors. As long as everything goes fine, you should not print anything to avoid needless cron mailings.
print_error(string $message, mixed $var = null)
Echo the error message to the client, automatically appending the classname to the prefix. Passed messages are also written to the error log.
string | $message | The error message to print. |
mixed | $var | A variable you want to print, if any. |
get_workflow(string $identifier, array $options = array()) : \midcom\workflow\dialog
string | $identifier | |
array | $options |
create_hour_report(\org_openpsa_projects_task_dba $task, $person_id, \org_openpsa_calendar_event_dba $event)
\org_openpsa_projects_task_dba | $task | |
$person_id | ||
\org_openpsa_calendar_event_dba | $event |