Define and operate over one Format.
More...
|
array | $format = array('font'=>array('size'=>10, 'name'=>'Arial')) |
|
Define and operate over one Format.
A big part of this class acts as a wrapper over other libraries maintaining Moodle functions isolated from underlying code.
- Copyright
- 1999 onwards Martin Dougiamas
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
MoodleExcelFormat::__construct |
( |
|
$properties = array() | ) |
|
Constructs one Moodle Format.
- Parameters
-
◆ get_format_array()
MoodleExcelFormat::get_format_array |
( |
| ) |
|
Returns standardised Excel format array.
- Return values
-
◆ parse_color()
MoodleExcelFormat::parse_color |
( |
|
$color | ) |
|
|
protected |
Standardise colour name.
- Parameters
-
mixed | $color | name of the color (i.e.: 'blue', 'red', etc..), or an integer (range is [8...63]). |
- Return values
-
string | the RGB color value |
◆ set_align()
MoodleExcelFormat::set_align |
( |
|
$location | ) |
|
Set the cell alignment of the format.
- Parameters
-
string | $location | alignment for the cell ('left', 'right', 'justify', etc...) |
◆ set_bg_color()
MoodleExcelFormat::set_bg_color |
( |
|
$color | ) |
|
Set background color of the cell.
- Parameters
-
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]) |
◆ set_bold()
MoodleExcelFormat::set_bold |
( |
|
$weight = 1 | ) |
|
Set weight of the format.
- Parameters
-
integer | $weight | Weight for the text, 0 maps to 400 (normal text), 1 maps to 700 (bold text). Valid range is: 100-1000. It's Optional, default is 1 (bold). |
◆ set_border()
MoodleExcelFormat::set_border |
( |
|
$style | ) |
|
Set cells borders to the same style.
- Parameters
-
integer | $style | style to apply for all cell borders. 1 => thin, 2 => thick. |
◆ set_bottom()
MoodleExcelFormat::set_bottom |
( |
|
$style | ) |
|
Set the bottom border of the format.
- Parameters
-
integer | $style | style for the cell. 1 => thin, 2 => thick |
◆ set_color()
MoodleExcelFormat::set_color |
( |
|
$color | ) |
|
Set color of the format.
Used to specify the color of the text to be formatted.
- Parameters
-
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]) |
◆ set_fg_color()
MoodleExcelFormat::set_fg_color |
( |
|
$color | ) |
|
◆ set_h_align()
MoodleExcelFormat::set_h_align |
( |
|
$location | ) |
|
Set the cell horizontal alignment of the format.
- Parameters
-
string | $location | alignment for the cell ('left', 'right', 'justify', etc...) |
◆ set_left()
MoodleExcelFormat::set_left |
( |
|
$style | ) |
|
Set the left border of the format.
- Parameters
-
integer | $style | style for the cell. 1 => thin, 2 => thick |
◆ set_num_format()
MoodleExcelFormat::set_num_format |
( |
|
$numformat | ) |
|
Set the numerical format of the format.
It can be date, time, currency, etc...
- Parameters
-
mixed | $numformat | The numeric format |
◆ set_pattern()
MoodleExcelFormat::set_pattern |
( |
|
$pattern = 1 | ) |
|
◆ set_right()
MoodleExcelFormat::set_right |
( |
|
$style | ) |
|
Set the right border of the format.
- Parameters
-
integer | $style | style for the cell. 1 => thin, 2 => thick |
◆ set_script()
MoodleExcelFormat::set_script |
( |
|
$script | ) |
|
Set the script of the text.
- Parameters
-
integer | $script | The value for script type. Possible values are: 1 => superscript, 2 => subscript |
◆ set_size()
MoodleExcelFormat::set_size |
( |
|
$size | ) |
|
Set the size of the text in the format (in pixels).
By default all texts in generated sheets are 10pt.
- Parameters
-
integer | $size | Size of the text (in points) |
◆ set_top()
MoodleExcelFormat::set_top |
( |
|
$style | ) |
|
Set the top border of the format.
- Parameters
-
integer | $style | style for the cell. 1 => thin, 2 => thick |
◆ set_underline()
MoodleExcelFormat::set_underline |
( |
|
$underline | ) |
|
Set underline of the format.
- Parameters
-
integer | $underline | The value for underline. Possible values are: 1 => underline, 2 => double underline |
◆ set_v_align()
MoodleExcelFormat::set_v_align |
( |
|
$location | ) |
|
Set the cell vertical alignment of the format.
- Parameters
-
string | $location | alignment for the cell ('top', 'bottom', 'center', 'justify') |
The documentation for this class was generated from the following file: