aboutsummaryrefslogtreecommitdiff
path: root/classes/ui_tables_plugin.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-10-22 02:55:15 +0300
committerValentin Popov <info@valentineus.link>2018-10-22 03:04:35 +0300
commitd8f5be667076ed3236b69125c1562337cf6f5fd2 (patch)
treea1ff00df9dcfc2cdef40cef256991921db3b1d2a /classes/ui_tables_plugin.php
parent99c835a63d806874e943273dfb0afa3465fe1d92 (diff)
downloadlocal_webhooks-d8f5be667076ed3236b69125c1562337cf6f5fd2.tar.xz
local_webhooks-d8f5be667076ed3236b69125c1562337cf6f5fd2.zip
Moodle style fixes
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'classes/ui_tables_plugin.php')
-rw-r--r--classes/ui_tables_plugin.php44
1 files changed, 22 insertions, 22 deletions
diff --git a/classes/ui_tables_plugin.php b/classes/ui_tables_plugin.php
index d08d3db..f65d3fe 100644
--- a/classes/ui_tables_plugin.php
+++ b/classes/ui_tables_plugin.php
@@ -36,24 +36,24 @@ require_once($CFG->libdir . '/tablelib.php');
*/
class local_webhooks_services_table extends table_sql {
/**
- * @var string $main_page
+ * @var string $mainpage
*/
- protected static $main_page = '/local/webhooks/index.php';
+ protected static $mainpage = '/local/webhooks/index.php';
/**
- * @var string $editor_page
+ * @var string $editorpage
*/
- protected static $editor_page = '/local/webhooks/service.php';
+ protected static $editorpage = '/local/webhooks/service.php';
/**
* Constructor.
*
- * @param string $unique_id
+ * @param string $uniqueid
*
* @throws \coding_exception
*/
- public function __construct($unique_id = '') {
- parent::__construct($unique_id);
+ public function __construct($uniqueid = '') {
+ parent::__construct($uniqueid);
$this->define_table_columns();
$this->define_table_configs();
}
@@ -61,12 +61,12 @@ class local_webhooks_services_table extends table_sql {
/**
* Query the database for results to display in the table.
*
- * @param int $page_size
- * @param boolean $use_initials_bar
+ * @param int $pagesize
+ * @param boolean $useinitialsbar
*
* @throws \dml_exception
*/
- public function query_db($page_size = 0, $use_initials_bar = false) {
+ public function query_db($pagesize = 0, $useinitialsbar = false) {
$this->rawdata = local_webhooks_api::get_services(array(), $this->get_page_start(), $this->get_page_size());
}
@@ -116,27 +116,27 @@ class local_webhooks_services_table extends table_sql {
public function col_actions($row) {
global $OUTPUT;
- $hide_show_icon = 't/show';
- $hide_show_string = new lang_string('enable', 'moodle');
+ $hideshowicon = 't/show';
+ $hideshowstring = new lang_string('enable', 'moodle');
if (!empty($row->status)) {
- $hide_show_icon = 't/hide';
- $hide_show_string = new lang_string('disable', 'moodle');
+ $hideshowicon = 't/hide';
+ $hideshowstring = new lang_string('disable', 'moodle');
}
/* Link for activation / deactivation */
- $hide_show_link = new moodle_url(self::$main_page, array('hideshowid' => $row->id, 'sesskey' => sesskey()));
- $hide_show_item = $OUTPUT->action_icon($hide_show_link, new pix_icon($hide_show_icon, $hide_show_string));
+ $hideshowlink = new moodle_url(self::$mainpage, array('hideshowid' => $row->id, 'sesskey' => sesskey()));
+ $hideshowitem = $OUTPUT->action_icon($hideshowlink, new pix_icon($hideshowicon, $hideshowstring));
/* Link for editing */
- $edit_link = new moodle_url(self::$editor_page, array('serviceid' => $row->id, 'sesskey' => sesskey()));
- $edit_item = $OUTPUT->action_icon($edit_link, new pix_icon('t/edit', new lang_string('edit', 'moodle')));
+ $editlink = new moodle_url(self::$editorpage, array('serviceid' => $row->id, 'sesskey' => sesskey()));
+ $edititem = $OUTPUT->action_icon($editlink, new pix_icon('t/edit', new lang_string('edit', 'moodle')));
/* Link to remove */
- $delete_link = new moodle_url(self::$main_page, array('deleteid' => $row->id, 'sesskey' => sesskey()));
- $delete_item = $OUTPUT->action_icon($delete_link, new pix_icon('t/delete', new lang_string('delete', 'moodle')));
+ $deletelink = new moodle_url(self::$mainpage, array('deleteid' => $row->id, 'sesskey' => sesskey()));
+ $deleteitem = $OUTPUT->action_icon($deletelink, new pix_icon('t/delete', new lang_string('delete', 'moodle')));
- return $hide_show_item . $edit_item . $delete_item;
+ return $hideshowitem . $edititem . $deleteitem;
}
/**
@@ -159,7 +159,7 @@ class local_webhooks_services_table extends table_sql {
* @throws \moodle_exception
*/
public function col_name($row) {
- $link = new moodle_url(self::$editor_page, array('serviceid' => $row->id, 'sesskey' => sesskey()));
+ $link = new moodle_url(self::$editorpage, array('serviceid' => $row->id, 'sesskey' => sesskey()));
return html_writer::link($link, $row->name);
}