PHP 클래스 FOF30\Toolbar\Toolbar

부터: 1.0
파일 보기 프로젝트 열기: akeeba/fof 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$perms Permissions map, see the __construct method for more information

보호된 프로퍼티들

프로퍼티 타입 설명
$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

getRenderFrontendSubmenu() 공개 메소드

Return the front-end submenu rendering flag

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