PHP Класс FOF30\Toolbar\Toolbar

С версии: 1.0
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$perms Permissions map, see the __construct method for more information

Защищенные свойства (Protected)

Свойство Тип Описание
$container Component container
$isDataView Are we rendering a data-aware view?
$linkbar The links to be rendered in the toolbar
$renderFrontendButtons Should I render buttons in the front-end?
$renderFrontendSubmenu Should I render the submenu in the front-end?
$useConfigurationFile Should I use the configuration file (fof.xml) of the component?

Открытые методы

Метод Описание
__construct ( Container $c, array $config = [] ) Public constructor.
appendLink ( string $name, string | null $link = null, boolean $active = false, string | null $icon = null, string | null $parent = '' ) : void Append a link to the link bar
clearLinks ( ) : void Removes all links from the link bar
getLinks ( ) : array Get the link bar's link definitions
getRenderFrontendButtons ( ) : boolean Return the front-end toolbar rendering flag
getRenderFrontendSubmenu ( ) : boolean Return the front-end submenu rendering flag
isDataView ( ) : boolean Is the view we are rendering the toolbar for a data-aware view?
onAdd ( ) : void Renders the toolbar for the component's Add pages
onBrowse ( ) : void Renders the toolbar for the component's Browse pages (the plural views)
onCpanelsBrowse ( ) : void Renders the toolbar for the component's Control Panel page
onEdit ( ) : void Renders the toolbar for the component's Edit pages
onRead ( ) : void Renders the toolbar for the component's Read pages
prefixLink ( string $name, string | null $link = null, boolean $active = false, string | null $icon = null ) : void Prefixes (some people erroneously call this "prepend" – there is no such word) a link to the link bar
renderSubmenu ( ) : void Renders the submenu (toolbar links) for all detected views of this component
renderToolbar ( string $view = null, string $task = null ) : void Renders the toolbar for the current view and task
setRenderFrontendButtons ( boolean $renderFrontendButtons )
setRenderFrontendSubmenu ( boolean $renderFrontendSubmenu )

Защищенные методы

Метод Описание
checkACL ( string $area ) : boolean Checks if the current user has enough privileges for the requested ACL privilege of a custom toolbar button.
getMyViews ( ) : array Automatically detects all views of the component
renderToolbarElements ( array $tasks ) : void Simplified default rendering without any attributes.

Приватные методы

Метод Описание
renderFromConfig ( array $toolbar ) : void Render the toolbar from the configuration.
renderToolbarElement ( string $type, mixed $value = null, array $attributes = [] ) : void Render a toolbar element.

Описание методов

__construct() публичный метод

The $config array can contain the following optional values: renderFrontendButtons bool Should I render buttons in the front-end of the component? renderFrontendSubmenu bool Should I render the submenu in the front-end of the component? useConfigurationFile bool Should we use the configuration file (fof.xml) of the component?
public __construct ( Container $c, array $config = [] )
$c FOF30\Container\Container The container for the component
$config array The configuration overrides, see above

checkACL() защищенный метод

Checks if the current user has enough privileges for the requested ACL privilege of a custom toolbar button.
protected checkACL ( string $area ) : boolean
$area string The ACL privilege as set up in the $this->perms object
Результат boolean True if the user has the ACL privilege specified

getMyViews() защищенный метод

Automatically detects all views of the component
protected getMyViews ( ) : array
Результат array A list of all views, in the order to be displayed in the toolbar submenu

getRenderFrontendButtons() публичный метод

Return the front-end toolbar rendering flag
public getRenderFrontendButtons ( ) : boolean
Результат boolean

getRenderFrontendSubmenu() публичный метод

Return the front-end submenu rendering flag
public getRenderFrontendSubmenu ( ) : boolean
Результат boolean

isDataView() публичный метод

Is the view we are rendering the toolbar for a data-aware view?
public isDataView ( ) : boolean
Результат boolean

onAdd() публичный метод

Renders the toolbar for the component's Add pages
public onAdd ( ) : void
Результат void

onBrowse() публичный метод

Renders the toolbar for the component's Browse pages (the plural views)
public onBrowse ( ) : void
Результат void

onCpanelsBrowse() публичный метод

Renders the toolbar for the component's Control Panel page
public onCpanelsBrowse ( ) : void
Результат void

onEdit() публичный метод

Renders the toolbar for the component's Edit pages
public onEdit ( ) : void
Результат void

onRead() публичный метод

Renders the toolbar for the component's Read pages
public onRead ( ) : void
Результат void

renderSubmenu() публичный метод

Renders the submenu (toolbar links) for all detected views of this component
public renderSubmenu ( ) : void
Результат void

renderToolbar() публичный метод

Renders the toolbar for the current view and task
public renderToolbar ( string $view = null, string $task = null ) : void
$view string The view of the component
$task string The exact task of the view
Результат void

renderToolbarElements() защищенный метод

Simplified default rendering without any attributes.
protected renderToolbarElements ( array $tasks ) : void
$tasks array Array of tasks.
Результат void

setRenderFrontendButtons() публичный метод

public setRenderFrontendButtons ( boolean $renderFrontendButtons )
$renderFrontendButtons boolean

setRenderFrontendSubmenu() публичный метод

public setRenderFrontendSubmenu ( boolean $renderFrontendSubmenu )
$renderFrontendSubmenu boolean

Описание свойств

$container защищенное свойство

Component container
protected $container

$isDataView защищенное свойство

Are we rendering a data-aware view?
protected $isDataView

$perms публичное свойство

Permissions map, see the __construct method for more information
public $perms

$renderFrontendButtons защищенное свойство

Should I render buttons in the front-end?
protected $renderFrontendButtons

$renderFrontendSubmenu защищенное свойство

Should I render the submenu in the front-end?
protected $renderFrontendSubmenu

$useConfigurationFile защищенное свойство

Should I use the configuration file (fof.xml) of the component?
protected $useConfigurationFile