Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 10 |
| TaskListItemDrop | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
20 | |
0.00% |
0 / 10 |
| save | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 4 |
|||
| getSortableModel | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 6 |
|||
| <?php | |
| namespace humhub\modules\tasks\models\lists; | |
| use humhub\modules\tasks\models\forms\ItemDrop; | |
| class TaskListItemDrop extends ItemDrop | |
| { | |
| public $contentContainer; | |
| public $modelClass = TaskList::class; | |
| public function save() | |
| { | |
| $this->getSortableModel()->moveItemIndex($this->itemId, $this->index); | |
| return true; | |
| } | |
| public function getSortableModel() | |
| { | |
| if(!$this->model && !$this->modelId) { | |
| return new UnsortedTaskList(['contentContainer' => $this->contentContainer]); | |
| } | |
| return parent::getSortableModel(); | |
| } | |
| } |