* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class moodle_html_component {
+class html_component {
/**
* @var string value to use for the id attribute of this HTML tag.
*/
$this->actions[] = $event;
} else {
if (empty($jsfunction)) {
- throw new coding_exception('moodle_html_component::add_action requires a JS function argument if the first argument is a string event');
+ throw new coding_exception('html_component::add_action requires a JS function argument if the first argument is a string event');
}
$this->actions[] = new component_action($event, $jsfunction, $jsfunctionargs);
}
}
-class labelled_html_component extends moodle_html_component {
+class labelled_html_component extends html_component {
/**
* @var mixed $label The label for that component. String or html_label object
*/
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_label extends moodle_html_component {
+class html_label extends html_component {
/**
* @var string $text The text to display in the label
*/
public $for;
/**
- * @see moodle_html_component::prepare()
+ * @see html_component::prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
public $rendertype = 'menu';
/**
- * @see moodle_html_component::prepare()
+ * @see html_component::prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
}
/**
- * @see moodle_html_component::prepare()
+ * @see html_component::prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_select_optgroup extends moodle_html_component {
+class html_select_optgroup extends html_component {
/**
* @var string $text The display value of the optgroup
*/
}
/**
- * @see moodle_html_component::prepare()
+ * @see html_component::prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
/**
- * @see moodle_html_component::prepare()
+ * @see html_component::prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_table_row extends moodle_html_component {
+class html_table_row extends html_component {
/**
* @var array $cells Array of html_table_cell objects
*/
public $cells = array();
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_table_cell extends moodle_html_component {
+class html_table_cell extends html_component {
/**
* @var string $text The contents of the cell
*/
public $header = null;
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_link extends moodle_html_component {
+class html_link extends html_component {
/**
* URL can be simple text or a moodle_url object
* @var mixed $url
public $disableifcurrent = false;
/**
- * @see lib/moodle_html_component#prepare() Disables the link if it links to the current page.
+ * @see lib/html_component#prepare() Disables the link if it links to the current page.
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
public $disabled = false;
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
public $src;
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_textarea extends moodle_html_component {
+class html_textarea extends html_component {
/**
* @param string $name Name to use for the textarea element.
*/
public $usehtmleditor;
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_form extends moodle_html_component {
+class html_form extends html_component {
/**
* @var string $method post or get
*/
}
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_list extends moodle_html_component {
+class html_list extends html_component {
/**
* @var array $items An array of html_list_item or html_list objects
public $text = false;
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_list_item extends moodle_html_component {
+class html_list_item extends html_component {
/**
* @var string $value The value of the list item
*/
public $value;
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class html_span extends moodle_html_component {
+class html_span extends html_component {
/**
* @var string $text The contents of the span
*/
public $contents;
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class moodle_paging_bar extends moodle_html_component {
+class moodle_paging_bar extends html_component {
/**
* @var int $maxdisplay The maximum number of pagelinks to display
*/
public $pagelinks = array();
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
public $url;
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
}
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
}
/**
- * @see lib/moodle_html_component#prepare()
+ * @see lib/html_component#prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class block_contents extends moodle_html_component {
+class block_contents extends html_component {
/** @var int used to set $skipid. */
protected static $idcounter = 1;
public $controls = array();
/**
- * @see moodle_html_component::prepare()
+ * @see html_component::prepare()
* @return void
*/
public function prepare(renderer_base $output, moodle_page $page, $target) {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class block_move_target extends moodle_html_component {
+class block_move_target extends html_component {
/**
* List of hidden form fields.
* @var array
}
/**
- * A helper function that takes a moodle_html_component subclass as param.
+ * A helper function that takes a html_component subclass as param.
* If that component has an id attribute and an array of valid component_action objects,
* it sets up the appropriate event handlers.
*
- * @param moodle_html_component $component
+ * @param html_component $component
* @return void;
*/
protected function prepare_event_handlers(&$component) {
}
/**
- * Given a moodle_html_component with height and/or width set, translates them
+ * Given a html_component with height and/or width set, translates them
* to appropriate CSS rules.
*
- * @param moodle_html_component $component
+ * @param html_component $component
* @return string CSS rules
*/
protected function prepare_legacy_width_and_height($component) {
if (!empty($component->height)) {
// We need a more intelligent way to handle these warnings. If $component->height have come from
// somewhere in deprecatedlib.php, then there is no point outputting a warning here.
- // debugging('Explicit height given to moodle_html_component leads to inline css. Use a proper CSS class instead.', DEBUG_DEVELOPER);
+ // debugging('Explicit height given to html_component leads to inline css. Use a proper CSS class instead.', DEBUG_DEVELOPER);
$output .= "height: {$component->height}px;";
}
if (!empty($component->width)) {
- // debugging('Explicit width given to moodle_html_component leads to inline css. Use a proper CSS class instead.', DEBUG_DEVELOPER);
+ // debugging('Explicit width given to html_component leads to inline css. Use a proper CSS class instead.', DEBUG_DEVELOPER);
$output .= "width: {$component->width}px;";
}
return $output;
/**
* Creates and returns a button to a popup window
*
- * @param html_link $link Subclass of moodle_html_component
+ * @param html_link $link Subclass of html_component
* @param moodle_popup $popup A moodle_popup object
* @param html_image $image An optional image replacing the link text
*
/**
* Creates and returns a spacer image with optional line break.
*
- * @param html_image $image Subclass of moodle_html_component
+ * @param html_image $image Subclass of html_component
*
* @return string HTML fragment
*/
/**
* Creates and returns an image.
*
- * @param html_image $image Subclass of moodle_html_component
+ * @param html_image $image Subclass of html_component
*
* @return string HTML fragment
*/
$oddeven = $oddeven ? 0 : 1;
if (isset($table->rowclasses[$key])) {
- $row->add_classes(array_unique(moodle_html_component::clean_classes($table->rowclasses[$key])));
+ $row->add_classes(array_unique(html_component::clean_classes($table->rowclasses[$key])));
}
$row->add_class('r' . $oddeven);
}
if (isset($table->colclasses[$key])) {
- $cell->add_classes(array_unique(moodle_html_component::clean_classes($table->colclasses[$key])));
+ $cell->add_classes(array_unique(html_component::clean_classes($table->colclasses[$key])));
}
$cell->add_classes('cell');