/** * Prepare javscript code to hide custom row button * * @param string $id custom button id * * @return string */ public function getCustomButtonsHide($id = '') { $customButtonsHide = ""; $rowActionButtons = $this->grid->getRowActionButtons(); foreach ($rowActionButtons as $button) { if (!$id) { $customButtonsHide .= "\n id = (typeof elem == 'undefined') ? rowid : elem;\n jQuery('tr#' + id + ' div." . $button['class'] . "').hide();\n "; } else { $customButtonsHide .= "\n jQuery('tr#{$id} div." . $button['class'] . "').hide();\n "; } } return $customButtonsHide; }