Copyright (C) 2010 - 2019 All Rights Reserved. Contributor(s): Mark J Crane */ if (!class_exists('button')) { class button { public static $collapse = 'hide-md-dn'; static function create($array) { $button_icons = $_SESSION['theme']['button_icons']['text'] != '' ? $_SESSION['theme']['button_icons']['text'] : 'auto'; //button: open $button = ""; //link if ($array['link']) { $button = "".$button.""; } return $button; unset($button); } } } /* //usage echo button::create(['type'=>'button','label'=>$text['button-label'],'icon'=>'icon','name'=>'btn','id'=>'btn','value'=>'value','link'=>'url','target'=>'_blank','onclick'=>'javascript','class'=>'name','style'=>'css','title'=>$text['button-label'],'collapse'=>'class']); echo button::create([ 'type'=>'button', 'label'=>$text['button-label'], 'icon'=>'icon', 'name'=>'btn', 'id'=>'btn', 'value'=>'value', 'link'=>'url', 'target'=>'_blank', 'onclick'=>'javascript', 'class'=>'name', 'style'=>'css', 'title'=>$text['button-label'], 'collapse'=>'class' ]); //options type 'button' (default) | 'submit' | 'link' label button text icon name without vendor prefix (e.g. 'user' instead of 'fa-user') value submitted value (if type is also set to 'submit') target '_blank' | '_self' (default) | etc onclick javascript class css class[es] style css style[s] title tooltip text (if not set, defaults to value of label) collapse overide the default hide class ('hide-md-dn') //notes 1) all parameters are optional, but at least set a value for label or icon 2) overide the default hide class ('hide-md-dn') for all buttons that follow by using... button::$collapse = '...'; 3) setting either collapse (instance or default) to false (boolean) will cause the button label to always be visible */ ?>