Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 15 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
| tao_models_classes_table_PropertyColumn | |
0.00% |
0 / 15 |
|
0.00% |
0 / 5 |
30 | |
0.00% |
0 / 1 |
| fromArray | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getProperty | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| getDataProvider | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| toArray | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2002-2008 (original work) Public Research Centre Henri Tudor & University of Luxembourg |
| 19 | * (under the project TAO & TAO2); |
| 20 | * 2008-2010 (update and modification) Deutsche Institut für Internationale Pädagogische Forschung |
| 21 | * (under the project TAO-TRANSFER); |
| 22 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
| 23 | * (under the project TAO-SUSTAIN & TAO-DEV); |
| 24 | * |
| 25 | */ |
| 26 | |
| 27 | /** |
| 28 | * Short description of class tao_models_classes_table_PropertyColumn |
| 29 | * |
| 30 | * @access public |
| 31 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 32 | * @package tao |
| 33 | |
| 34 | */ |
| 35 | class tao_models_classes_table_PropertyColumn extends tao_models_classes_table_Column |
| 36 | { |
| 37 | // --- ASSOCIATIONS --- |
| 38 | |
| 39 | |
| 40 | // --- ATTRIBUTES --- |
| 41 | |
| 42 | /** |
| 43 | * Short description of attribute property |
| 44 | * |
| 45 | * @access public |
| 46 | * @var Property |
| 47 | */ |
| 48 | public $property = null; |
| 49 | |
| 50 | // --- OPERATIONS --- |
| 51 | |
| 52 | /** |
| 53 | * Short description of method fromArray |
| 54 | * |
| 55 | * @access protected |
| 56 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 57 | * @param array array |
| 58 | * @return tao_models_classes_table_PropertyColumn |
| 59 | */ |
| 60 | protected static function fromArray($array) |
| 61 | { |
| 62 | $returnValue = null; |
| 63 | |
| 64 | |
| 65 | $returnValue = new static(new core_kernel_classes_Property($array['prop'])); |
| 66 | |
| 67 | |
| 68 | return $returnValue; |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Short description of method __construct |
| 73 | * |
| 74 | * @access public |
| 75 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 76 | * @param Property property |
| 77 | * @return mixed |
| 78 | */ |
| 79 | public function __construct(core_kernel_classes_Property $property) |
| 80 | { |
| 81 | |
| 82 | $this->property = $property; |
| 83 | parent::__construct($property->getLabel()); |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Short description of method getProperty |
| 88 | * |
| 89 | * @access public |
| 90 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 91 | * @return core_kernel_classes_Property |
| 92 | */ |
| 93 | public function getProperty() |
| 94 | { |
| 95 | $returnValue = null; |
| 96 | |
| 97 | |
| 98 | $returnValue = $this->property; |
| 99 | |
| 100 | |
| 101 | return $returnValue; |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Short description of method getDataProvider |
| 106 | * |
| 107 | * @access public |
| 108 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 109 | * @return tao_models_classes_table_DataProvider |
| 110 | */ |
| 111 | public function getDataProvider() |
| 112 | { |
| 113 | $returnValue = null; |
| 114 | |
| 115 | |
| 116 | $returnValue = tao_models_classes_table_PropertyDP::singleton(); |
| 117 | |
| 118 | |
| 119 | return $returnValue; |
| 120 | } |
| 121 | |
| 122 | /** |
| 123 | * Short description of method toArray |
| 124 | * |
| 125 | * @access public |
| 126 | * @author Joel Bout, <joel.bout@tudor.lu> |
| 127 | * @return array |
| 128 | */ |
| 129 | public function toArray() |
| 130 | { |
| 131 | $returnValue = []; |
| 132 | |
| 133 | |
| 134 | $returnValue = parent::toArray(); |
| 135 | $returnValue['prop'] = $this->property->getUri(); |
| 136 | |
| 137 | |
| 138 | return (array) $returnValue; |
| 139 | } |
| 140 | } |