Methods summary
public
|
#
__construct( )
Initialize Navigation
Overrides
|
public
integer
|
#
add( array $vars )
Adds a new navigation item
Adds a new navigation item
Parameters
- $vars
An array of navigation item info including:
- action_id The ID of the action linked to this navigation item
- order The order index used to determine the order in which navigation items
are displayed (optional, highest index + 1 by default)
- parent_id The ID of the navigation item under which
to display this navigation item (optional, null by default)
- parent_url The URL by which to determine which navigation item to display this one under (optional)
Returns
integer The ID for this navigation item, void on error
|
public
|
#
delete( array $filters = [] )
Deletes existing actions
Parameters
- $filters
A list of parameters by which to filter the results, including:
- company_id The ID of the company for which to delete action
- url The URL of the navigation item's action
- location The location in which an action is allowed to be displayed
- plugin_id The ID of the plugin for which to delete action
- parent_id The ID of the parent nav for which to delete subitems
|
public
array
|
#
getAll( array $filters, array $order = ['navigation_items.order' => 'ASC'] )
Gets a list of navigation items matching the given filters
Gets a list of navigation items matching the given filters
Parameters
- $filters
A list of parameters by which to filter the results, including:
- action_id The ID of the action to which the navigation item is attached
- company_id The ID of the company for which the navigation item is display
- plugin_id The ID of the plugin for which the navigation item was created
- url The URL of the navigation item's action
- location The location in which an action is allowed to be displayed
- child Whether to fetch navigation items with parents (true to fetch child items,
false to fetch parent items)
- $order
- The sort and order conditions (e.g. array('sort_field'=>"ASC"), optional)
Returns
array A partial record object used to fetch navigation items and their actions from the database
|
public
array
|
#
getPrimary( string $base_uri )
Retrieves the primary navigation
Retrieves the primary navigation
Parameters
- $base_uri
- The base_uri for the currently logged in user
Returns
array An array of main navigation elements in key/value pairs
where each key is the URI and each value is an array representing that element including:
- name The name of the link
- active True if the element is active
- sub An array of subnav elements (optional) following the same indexes as above
|
public
array
|
#
getPrimaryClient( string $base_uri )
Retrieves the primary navigation for the client interface
Retrieves the primary navigation for the client interface
Parameters
- $base_uri
- The base_uri for the currently logged in user
Returns
array An array of main navigation elements in key/value pairs
where each key is the URI and each value is an array representing that element including:
- name The name of the link
- active True if the element is active
- sub An array of subnav elements (optional) following the same indexes as above
|
public
array
|
#
getPrimaryPublic( string $base_uri, string $base_user_uri )
Retrieves the navigation for unauthenticated clients
Retrieves the navigation for unauthenticated clients
Parameters
- $base_uri
- The base_uri for the user not logged in
- $base_user_uri
- The base_uri for a logged in user
Returns
array An array of main navigation elements in key/value pairs
where each key is the URI and each value is an array representing that element including:
- name The name of the link
- active True if the element is active
- sub An array of subnav elements (optional) following the same indexes as above
|
public
array
|
#
getCompany( string $base_uri )
Retrieves the navigation for company settings
Retrieves the navigation for company settings
Parameters
- $base_uri
- The base_uri for the currently logged in user
Returns
array A numerically-indexed array of the company settings
navigation where each element contains an array which includes:
- name The name of the element
- class The CSS class name for the element
- uri The URI for the element
- children An array of child elements which follow the same indexes as above
|
public
array
|
#
getSystem( string $base_uri )
Retrieves the navigation for system settings
Retrieves the navigation for system settings
Parameters
- $base_uri
- The base_uri for the currently logged in user
Returns
array A numerically-indexed array of the system settings
navigation where each element contains an array which includes:
- name The name of the element
- class The CSS class name for the element
- uri The URI for the element
- children An array of child elements which follow the same indexes as above
|
public
array
|
#
getSearchOptions( string $base_uri = null )
Fetches all search options available to the current company
Fetches all search options available to the current company
Parameters
- $base_uri
- The base_uri for the currently logged in user
Returns
array An array of search items in key/value pairs, where each
key is the search type and each value is the language for the search type
|
public
array
|
#
getPluginNav( string $location )
Returns all plugin navigation for the requested location
Returns all plugin navigation for the requested location
Parameters
- $location
- The location to fetch plugin navigation for
Returns
array An array of plugin navigation
|
public
this
|
#
baseUri( string $label, string $uri )
Adds a URI referenced by its label
Adds a URI referenced by its label
Parameters
- $label
- The unique label to set for the URI
- $uri
- The URI
Returns
this
|