1. Go to this page and download the library: Download suhaboncukcu/assign-task library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
//you can find an example in vendor/AssignTask/config/missions.sample.config
//in your bootstrap.php:
Configure::write('Missions.config', ['missions']);
bin/cake migrations migrate -p AssignTask
$this->loadModel('AssignTask.Missions');
//create new mission
$mission = $this->Missions->newEntity();
$data = [
'to_id' => 1,
'from_id'=> 2,
'mission' => 'please send mail to customers',
'schedule' => '2016-12-12 10:00'
];
$this->Missions->patchEntity($mission, $data);
$this->Missions->save($mission);
//assign existing mission to someone else
$mission = $this->Missions->get(1);
$mission->to_id = 3;
//can change from id too. If somebody else this that assignment.
//for example, in this assignment user with id 3 assigns this mission to
//himself/herself
$mission->from_id = 3;
$this->Missions->assignTo($mission);
//complete an existing issue
$mission = $this->Missions->get(5);
$this->Missions->complete($mission);
// list all uncompleted tasks including reassigned ones
$missions = $this->Missions->find('Uncompleted');
// list all completed tasks including reassigned ones
$missions = $this->Missions->find('Completed');
// list all uncompleted tasks including reassigned ones
// passed the due date
$missions = $this->Missions->find('UncompletedPassed');
// list all tasks without reassigned ones
// so this is what you need to show current uncompleted tasks
$missions = $this->Missions->find('WOReassigned');
// list all tasks
// while getting their parent tasks. So you can check
// which task this was.
$missions = $this->Missions
->find('Parents');
// list all tasks
// while getting their child tasks. So you can check
// which task reassigned again.
$missions = $this->Missions
->find('Children');
// of course, you can use different finders together
$missions = $this->Missions
->find('Uncompleted')
->find('WOReassigned')
->find('Parents')
->find('Children');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.