Gets an instance of a component's toolbar
static
FOFToolbar
&getAnInstance
([
string $option =
null], [
array $config =
array()])
-
string
$option: The name of the component
-
array
$config: The configuration array for the component
Public cinstructor
FOFToolbar
__construct
([array $config = array()])
-
array
$config: The configuration array of the component
Append a link to the link bar
void
appendLink
(string $name, [string|null $link = null], [boolean $active = false], [string|null $icon = null], [string|null $parent = ''])
-
string
$name: The text of the link
-
string|null
$link: The link to render; set to null to render a separator
-
boolean
$active: True if it's an active link
-
string|null
$icon: Icon class (used by some renderers, like the Bootstrap renderer)
-
string|null
$parent: The parent element (referenced by name)) Thsi will create a dropdown list
Removes all links from the link bar
void
clearLinks
()
Get the link bar's link definitions
array
&getLinks
()
Automatically detects all views of the component
array
getMyViews
()
Return the front-end toolbar rendering flag
boolean
getRenderFrontendButtons
()
Return the front-end submenu rendering flag
boolean
getRenderFrontendSubmenu
()
Renders the toolbar for the component's Add pages
void
onAdd
()
Renders the toolbar for the component's Browse pages (the plural views)
void
onBrowse
()
Renders the toolbar for the component's Control Panel page
void
onCpanelsBrowse
()
Renders the toolbar for the component's Edit pages
void
onEdit
()
Renders the toolbar for the component's Read pages
void
onRead
()
Prefixes (some people erroneously call this "prepend" – there is no such word) a link to the link bar
void
prefixLink
(string $name, [string|null $link = null], [boolean $active = false], [string|null $icon = null])
-
string
$name: The text of the link
-
string|null
$link: The link to render; set to null to render a separator
-
boolean
$active: True if it's an active link
-
string|null
$icon: Icon class (used by some renderers, like the Bootstrap renderer)
Renders the submenu (toolbar links) for all detected views of this component
void
renderSubmenu
()
Renders the toolbar for the current view and task
void
renderToolbar
([
string $view =
null], [
string $task =
null], [
FOFInput $input =
null])
-
string
$view: The view of the component
-
string
$task: The exact task of the view
-
FOFInput
$input: An optional input object used to determine the defaults