public function get_managed_object_name_plural() { $table_name = $this->get_table_name(); #echo $table_name; if (preg_match('/^(?:ps_|hpi_|hci_)(\\w+)/', $table_name, $matches)) { #echo "Match\n"; # #print_r($matches); $table_name = $matches[1]; } else { echo "No match!\n"; } $c = Formatting_ListOfWords::capitalise_delimited_string($table_name, '_'); #echo $c; #exit; return $c; }
protected function render_form_li_textarea($name, $value = NULL, $title = NULL, $cols = 50, $rows = 20) { #echo $value; exit; if (!isset($title)) { $title = Formatting_ListOfWords::capitalise_delimited_string($name, '_'); } ?> <li> <label for="page"><?php echo $title; ?> </label> <textarea name="<?php echo $name; ?> " id="<?php echo $name; ?> " cols="<?php echo $cols; ?> " rows="<?php echo $rows; ?> " ><?php if (isset($value)) { $value = stripcslashes($value); echo $value; } ?> </textarea> <span id="<?php echo $name; ?> msg" class="rules" ></span> </li> <?php }
/** * Makes the content of the action TD. * * Refactor common elements with * Database_CRUDAdminPage::make_content_for_action_td_for_item * */ public function make_content_for_action_td($action_name, $identifiers) { #print_r($identifiers); #exit; switch ($action_name) { case 'shift_back': $non_link_key = $this->get_key_of_current_max(); break; case 'shift_forward': $non_link_key = $this->get_key_of_current_min(); break; default: throw new Exception('Unknown action name!'); } #print_r($non_link_key); $non_link = TRUE; foreach ($non_link_key as $k => $v) { if ($identifiers[$k] != $v) { $non_link = FALSE; break; } } if ($non_link) { return ' '; } else { $c = Formatting_ListOfWords::capitalise_delimited_string($action_name, '_'); $a = new HTMLTags_A($c); $url = $this->get_action_redirect_script_url($action_name, $identifiers); $a->set_href($url); return $a->get_as_string(); } }