Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| tao_helpers_form_elements_Treebox | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| rangeToTree | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | use core_kernel_classes_Class as KernelClass; |
| 4 | use oat\tao\helpers\form\elements\TreeAware; |
| 5 | use oat\taoBackOffice\model\tree\TreeService; |
| 6 | |
| 7 | /** |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License |
| 10 | * as published by the Free Software Foundation; under version 2 |
| 11 | * of the License (non-upgradable). |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 21 | * |
| 22 | * Copyright (c) 2008-2010 (original work) Deutsche Institut für Internationale Pädagogische Forschung |
| 23 | * (under the project TAO-TRANSFER); |
| 24 | * 2009-201 (update and modification) Public Research Centre Henri Tudor |
| 25 | * (under the project TAO-SUSTAIN & TAO-DEV); |
| 26 | * |
| 27 | * Copyright (c) 2015 (original work) Open Assessment Technologies SA; |
| 28 | * |
| 29 | * Short description of class tao_helpers_form_elements_TreeBox |
| 30 | * |
| 31 | * @abstract |
| 32 | * @access public |
| 33 | * @author Mikhail Kamarouski, <kamarouski@1pt.com> |
| 34 | * @package tao |
| 35 | |
| 36 | */ |
| 37 | abstract class tao_helpers_form_elements_Treebox extends tao_helpers_form_elements_MultipleElement implements TreeAware |
| 38 | { |
| 39 | public const WIDGET_ID = 'http://www.tao.lu/datatypes/WidgetDefinitions.rdf#TreeBox'; |
| 40 | |
| 41 | public function rangeToTree(KernelClass $range, $recursive = false) |
| 42 | { |
| 43 | return TreeService::singleton()->getNestedStructure($range->getInstances(false)); |
| 44 | } |
| 45 | } |