mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-02-13 21:28:41 +00:00
Use global namespace+minor fixes
This commit is contained in:
parent
65dacc3b50
commit
7d65bc0ee6
|
|
@ -317,7 +317,7 @@ class Task implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Get created by
|
* Get created by
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int|\phpOMS\Account\Account
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ class TaskElement implements \JsonSerializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return int|\phpOMS\Account\Account
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,11 @@ final class TaskElementMapper extends DataMapperAbstract
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, null|string>>
|
* @var array<string, array<string, null|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*/ /**
|
||||||
|
* Has many relation.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, string>>
|
||||||
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $hasMany = [
|
protected static $hasMany = [
|
||||||
'media' => [
|
'media' => [
|
||||||
|
|
@ -63,6 +68,12 @@ final class TaskElementMapper extends DataMapperAbstract
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Belongs to.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, string>>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
protected static $belongsTo = [
|
protected static $belongsTo = [
|
||||||
'createdBy' => [
|
'createdBy' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,11 @@ final class TaskMapper extends DataMapperAbstract
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, null|string>>
|
* @var array<string, array<string, null|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*/ /**
|
||||||
|
* Has many relation.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, string>>
|
||||||
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $hasMany = [
|
protected static $hasMany = [
|
||||||
'taskElements' => [
|
'taskElements' => [
|
||||||
|
|
@ -81,6 +86,12 @@ final class TaskMapper extends DataMapperAbstract
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Belongs to.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, string>>
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
protected static $belongsTo = [
|
protected static $belongsTo = [
|
||||||
'createdBy' => [
|
'createdBy' => [
|
||||||
'mapper' => AccountMapper::class,
|
'mapper' => AccountMapper::class,
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ use \Modules\Tasks\Models\TaskStatus;
|
||||||
$task = $this->getData('task');
|
$task = $this->getData('task');
|
||||||
$taskMedia = $task->getMedia();
|
$taskMedia = $task->getMedia();
|
||||||
$elements = $task->getTaskElements();
|
$elements = $task->getTaskElements();
|
||||||
$cElements = count($elements);
|
$cElements = \count($elements);
|
||||||
$forwarded = $task->getCreatedBy()->getId();
|
$forwarded = $task->getCreatedBy()->getId();
|
||||||
$color = $this->getStatus($task->getStatus());
|
$color = $this->getStatus($task->getStatus());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user