yfix.net
  • Home
  • Docs
  • Form
  • Slate
    • bootstrap
    • cyborg
    • slate
  • Overview
  • Install
  • Demos
  • Forms
  • active_box
  • array_to_form
  • auto
  • box
  • button
  • button_radio_box
  • captcha
  • check_box
  • container
  • country_box
  • custom_fields
  • date_box
  • daterange
  • datetime_select
  • db_insert_if_ok
  • div_box
  • email
  • events
  • fieldset
  • file
  • form
  • form_begin
  • func
  • google_maps
  • hidden
  • html5_inputs
  • icon_select_box
  • image_select_box
  • info
  • input
  • link
  • method_select_box
  • number
  • order_box
  • password
  • phone_box
  • radio_box
  • row
  • select2_box
  • select_box
  • stars
  • submit
  • tab
  • tbl_link
  • text
  • textarea
  • tinymce
  • tom_select_box
  • tpl_row
  • ui_range
  • upload
  • user_info
  • user_select_box
  • validate
  • Tables
  • HTML widgets
  • htmx
  • Misc

tbl_link(), tbl_link_add(), tbl_link_edit(), tbl_link_delete(), tbl_link_clone(), tbl_link_view(), tbl_link_active() form()

Small row-action links for item templates (category or menu editors): add, edit, delete, clone, view, active.

form()->tbl_link($name, $link, $extra = [], $replace = [])
form()->tbl_link_add($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_edit($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_delete($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_clone($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_view($name = '', $link = '', $extra = [], $replace = [])
form()->tbl_link_active($name = '', $link = '', $extra = [], $replace = [])

Options

OptionMeaning
$linkURL, or a $replace key; the tbl_link_* variants look for add_link / add_url, edit_link / edit_url... in $replace.
icon, class, class_add, hide_text, rewrite, target, titleLook of the link; default CLASS_BTN_MINI and the table2 icons.

Example

History Add Edit Delete Clone View

Code

$item = ['edit_link' => '#edit-7', 'delete_link' => '#delete-7', 'clone_link' => '#clone-7', 'view_link' => '#view-7', 'active_link' => '#active-7', 'add_link' => '#add'];
return form($item, ['no_form' => 1])
    ->tbl_link('History', '#history-7', ['icon' => 'fa fa-history'])
    ->tbl_link_add()
    ->tbl_link_edit()
    ->tbl_link_delete()
    ->tbl_link_clone()
    ->tbl_link_view()
    ->tbl_link_active();

Notes

  • In templates: {form_row('tbl_link_edit')} with the item as $replace (the drag tree of the category editor).
  • In the admin a link the admin group may not open is not printed.

See also: table/btn_edit, html/tree