added events for timesheet actions (#1598)
This commit is contained in:
34
src/Event/AbstractTimesheetEvent.php
Normal file
34
src/Event/AbstractTimesheetEvent.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
use App\Entity\Timesheet;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Base event class to used with timesheet manipulations.
|
||||
*/
|
||||
abstract class AbstractTimesheetEvent extends Event
|
||||
{
|
||||
/**
|
||||
* @var Timesheet
|
||||
*/
|
||||
private $timesheet;
|
||||
|
||||
public function __construct(Timesheet $timesheet)
|
||||
{
|
||||
$this->timesheet = $timesheet;
|
||||
}
|
||||
|
||||
public function getTimesheet(): Timesheet
|
||||
{
|
||||
return $this->timesheet;
|
||||
}
|
||||
}
|
||||
34
src/Event/AbstractTimesheetMultipleEvent.php
Normal file
34
src/Event/AbstractTimesheetMultipleEvent.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
use App\Entity\Timesheet;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Base event class to used with timesheet manipulations.
|
||||
*/
|
||||
abstract class AbstractTimesheetMultipleEvent extends Event
|
||||
{
|
||||
/**
|
||||
* @var Timesheet[]
|
||||
*/
|
||||
private $timesheets;
|
||||
|
||||
public function __construct(array $timesheets)
|
||||
{
|
||||
$this->timesheets = $timesheets;
|
||||
}
|
||||
|
||||
public function getTimesheets(): array
|
||||
{
|
||||
return $this->timesheets;
|
||||
}
|
||||
}
|
||||
14
src/Event/TimesheetCreatePostEvent.php
Normal file
14
src/Event/TimesheetCreatePostEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetCreatePostEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetCreatePreEvent.php
Normal file
14
src/Event/TimesheetCreatePreEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetCreatePreEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetDeleteMultiplePreEvent.php
Normal file
14
src/Event/TimesheetDeleteMultiplePreEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetDeleteMultiplePreEvent extends AbstractTimesheetMultipleEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetDeletePreEvent.php
Normal file
14
src/Event/TimesheetDeletePreEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetDeletePreEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetStopPostEvent.php
Normal file
14
src/Event/TimesheetStopPostEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetStopPostEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetStopPreEvent.php
Normal file
14
src/Event/TimesheetStopPreEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetStopPreEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetUpdateMultiplePostEvent.php
Normal file
14
src/Event/TimesheetUpdateMultiplePostEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetUpdateMultiplePostEvent extends AbstractTimesheetMultipleEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetUpdateMultiplePreEvent.php
Normal file
14
src/Event/TimesheetUpdateMultiplePreEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetUpdateMultiplePreEvent extends AbstractTimesheetMultipleEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetUpdatePostEvent.php
Normal file
14
src/Event/TimesheetUpdatePostEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetUpdatePostEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
14
src/Event/TimesheetUpdatePreEvent.php
Normal file
14
src/Event/TimesheetUpdatePreEvent.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Event;
|
||||
|
||||
final class TimesheetUpdatePreEvent extends AbstractTimesheetEvent
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user