JToolBarHelper is a Joomla API that allows developers to generate a toolbar on a Joomla website. The JToolBarHelper preferences function is used to define the items shown on the toolbar. The package library is Joomla.
Example 1: Add a New Button on the Toolbar
JToolBarHelper::addNew('add', 'Add');
This code adds a "New" button with an "add" icon to the toolbar, labeled "Add".
This code defines the "Save" button with a custom icon. The icon is a class named "toolbar-save-icon" in CSS.
Example 3: Custom Button on the Toolbar
$bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Custom', 'Custom Button on the Toolbar');
This code adds a custom button to the toolbar with 'Custom Button on the Toolbar' label and span tags surrounding.
In conclusion, JToolBarHelper is a very handy Joomla API that allows developers to define all types of buttons and tools that are required in a toolbar on a Joomla website. The examples give an insight into how the API functions to those who are not familiar with Joomla. The package library, in this case, is Joomla.
PHP JToolBarHelper::Preferences - 1 examples found. These are the top rated real world PHP examples of JToolBarHelper::Preferences extracted from open source projects. You can rate examples to help us improve the quality of examples.