Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle 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 Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
namespace core_table\output;
18
 
19
/**
20
 * Component representing a table cell.
21
 *
22
 * @copyright 2009 Nicolas Connault
23
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 * @since Moodle 2.0
25
 * @package core_table
26
 * @category output
27
 */
28
class html_table_cell {
29
    /**
30
     * @var string Value to use for the id attribute of the cell.
31
     */
32
    public $id = null;
33
 
34
    /**
35
     * @var string The contents of the cell.
36
     */
37
    public $text;
38
 
39
    /**
40
     * @var string Abbreviated version of the contents of the cell.
41
     */
42
    public $abbr = null;
43
 
44
    /**
45
     * @var int Number of columns this cell should span.
46
     */
47
    public $colspan = null;
48
 
49
    /**
50
     * @var int Number of rows this cell should span.
51
     */
52
    public $rowspan = null;
53
 
54
    /**
55
     * @var string Defines a way to associate header cells and data cells in a table.
56
     */
57
    public $scope = null;
58
 
59
    /**
60
     * @var bool Whether or not this cell is a header cell.
61
     */
62
    public $header = null;
63
 
64
    /**
65
     * @var string Value to use for the style attribute of the table cell
66
     */
67
    public $style = null;
68
 
69
    /**
70
     * @var array Attributes of additional HTML attributes for the <td> element
71
     */
72
    public $attributes = [];
73
 
74
    /**
75
     * Constructs a table cell
76
     *
77
     * @param string $text
78
     */
79
    public function __construct($text = null) {
80
        $this->text = $text;
81
        $this->attributes['class'] = '';
82
    }
83
}
84
 
85
// Alias this class to the old name.
86
// This file will be autoloaded by the legacyclasses autoload system.
87
// In future all uses of this class will be corrected and the legacy references will be removed.
88
class_alias(html_table_cell::class, \html_table_cell::class);