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

  • AdminController
  • AppModel
  • ClientController
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class ClientController

Client Parent Controller

AppController
Extended by ClientController

Direct known subclasses

ClientAccounts, ClientContacts, ClientDialog, ClientEmails, ClientInvoices, ClientMain, ClientServices, ClientTransactions
Package: blesta\app
Copyright: Copyright (c) 2019, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/client_controller.php
Methods summary
public
# preAction( )

Pre action

Pre action

protected boolean
# isStaffAsClient( )

Checks whether the current user is a staff user and whether the user is currently logged into the client portal.

Checks whether the current user is a staff user and whether the user is currently logged into the client portal.

Returns

boolean
True if the user is a staff user logged in as a client, false otherwise
protected
# setNav( )

Sets the primary and secondary navigation links. Performs authorization checks on each navigational element. May cache nav results if possible for better performance.

Sets the primary and secondary navigation links. Performs authorization checks on each navigational element. May cache nav results if possible for better performance.

protected
# requireLogin( $redirect_to = null )
protected
# requirePermission( string $area )

Verifies permissions for the given generic $area

Verifies permissions for the given generic $area

Parameters

$area
The generic area
protected boolean
# hasPermission( string $area )

Verifies if the current user has permission to the given area

Verifies if the current user has permission to the given area

Parameters

$area
The generic area

Returns

boolean
True if user has permission, false otherwise
protected boolean
# authorized( string $controller = null, string $action = null, stdClass $group = null )

Verifies that the currently logged in user is authorized for the given Controller and Action (or current Controller/Action if none given). Will first check whether the Controller and Action is a permission value, and if so, checks to ensure the staff or client group user is authorized to access that resource

Verifies that the currently logged in user is authorized for the given Controller and Action (or current Controller/Action if none given). Will first check whether the Controller and Action is a permission value, and if so, checks to ensure the staff or client group user is authorized to access that resource

Parameters

$controller
The controller to check authorization on, null will default to the current controller
$action
The action to check authorization on, null will default to the current action
$group

The staff or client group to check authorization on, null will fetch the group of the current user

Returns

boolean
Returns true if the user is authorized for that resource, false otherwise
Blesta API documentation generated by ApiGen