Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Accounts
  • Actions
  • ApiKeys
  • Backup
  • CalendarEvents
  • ClientGroups
  • Clients
  • Companies
  • Contacts
  • Countries
  • Coupons
  • CouponTerms
  • CronTasks
  • Currencies
  • EmailGroups
  • Emails
  • EmailVerifications
  • Encryption
  • GatewayManager
  • Invoices
  • InvoiceTemplateManager
  • Languages
  • Logs
  • Marketplace
  • MessageGroups
  • Messages
  • MessengerManager
  • ModuleClientMeta
  • ModuleManager
  • ModuleTypes
  • Navigation
  • PackageGroups
  • PackageOptionGroups
  • PackageOptions
  • Packages
  • Payments
  • Permissions
  • PluginManager
  • Pricings
  • ReportManager
  • ServiceChanges
  • ServiceInvoices
  • Services
  • Settings
  • Staff
  • StaffGroups
  • States
  • SystemEvents
  • Taxes
  • Themes
  • Transactions
  • Users
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Navigation

Handles navigation.

Model
Extended by AppModel uses Blesta\Core\Util\Common\Traits\Container
Extended by Navigation
Package: blesta\app\models
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/models/navigation.php
Methods summary
public
# __construct( )

Initialize Navigation

Initialize Navigation

Overrides

AppModel::__construct()
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

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
Methods inherited from AppModel
_(), boolToInt(), currencyToDecimal(), dateToUtc(), errors(), getPerPage(), ifSet(), loadCrypto(), setDefaultIfEmpty(), setPerPage(), setRulesIfSet(), strToBool(), systemDecrypt(), systemEncrypt(), systemHash(), truncateDecimal(), validateExists(), validateStateCountry()
Methods used from Blesta\Core\Util\Common\Traits\Container
getFromContainer()
Properties inherited from AppModel
$logger, $replacement_keys
Blesta API documentation generated by ApiGen