public static function confirm_a($href = '', $title = 'Are you sure?', $extra = []) { if (is_array($href)) { $href['class'] .= ' js-o_dialog'; $href['href'] = $href['href'] ? $href['href'] : '#'; echo '<a ' . o::convert2attributes($href) . '>'; } else { $defaults = ['icon' => 'exclamation-triangle']; $extra = array_merge($defaults, $extra); $extra['heading'] = $title; $class = $extra['class']; unset($extra['class']); echo '<a href="' . $href . '" class="js-o_dialog ' . $class . '" ' . o::convert2data($extra) . '>'; } }
public static function table_row($class = null, $extra = []) { $class = $class ? ' class="' . $class . '"' : ''; $extra = o::convert2attributes($extra); echo '</td><td' . $class . ' ' . $extra . '>'; }