Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • areyouahuman
      • auth
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
        • default
      • exchange
        • rates
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • quickbooks
            • invoice
      • json
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • recaptcha
      • reports
        • aging
          • invoices
        • custom
          • report
        • invoice
          • creation
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • form
      • html
      • javascript
      • xml
    • lib
  • None
  • PHP

Classes

  • AdminController
  • AYAH
  • Backup
  • ClientController
  • Ldap

Class ClientController

Client Parent Controller

Controller
Extended by AppController
Extended by ClientController

Direct known subclasses

ClientAccounts, ClientContacts, ClientDialog, ClientInvoices, ClientServices, ClientTransactions

Located at app/client_controller.php

Methods summary

public
# preAction( )

Pre action

Pre action

Overrides

AppController::preAction
public
# getWidgets( )

Outputs a JSON encoded array of all widgets to be displayed within the requested controller. Expects $this->get[0] to identify the client ID for which items are to be rendered.

Outputs a JSON encoded array of all widgets to be displayed within the requested controller. Expects $this->get[0] to identify the client ID for which items are to be rendered.

Overrides

AppController::getWidgets
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

Overrides

AppController::isStaffAsClient
protected
# clientWidgets( )

Outputs a JSON encoded array of admin widgets for the requested controller

Outputs a JSON encoded array of admin widgets for the requested controller

Overrides

AppController::clientWidgets
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.

Overrides

AppController::setNav
protected integer
# requireLogin( string $redirect_to = null )

Ensures that the user has an active session with a "blesta_id" set. Detects whether the current request is an AJAX request, and only redirects non-AJAX based requests, otherwise issues "401 Unauthorized".

Ensures that the user has an active session with a "blesta_id" set. Detects whether the current request is an AJAX request, and only redirects non-AJAX based requests, otherwise issues "401 Unauthorized".

Parameters

$redirect_to
string
$redirect_to The URI/URL to redirect to for non-AJAX unauthorized requests, defaults to the login screen. CAUTION: Be careful where you redirect as you may create a redirection loop if the page you are directing to also invokes this method

Returns

integer
The ID of the user currently logged in to the portal

Overrides

AppController::requireLogin
protected
# requirePermission( string $area )

Verifies permissions for the given generic $area

Verifies permissions for the given generic $area

Parameters

$area
string
$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
string
$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
string
$controller The controller to check authorization on, null will default to the current controller
$action
string
$action The action to check authorization on, null will default to the current action
$group
stdClass
$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

Overrides

AppController::authorized

Methods inherited from AppController

__construct(), adminWidgets(), flashMessage(), getCompany(), getDaysOfWeek(), getMonths(), getTimes(), isAjax(), isLoggedIn(), layoutSections(), licenseCheck(), outputAsJson(), postAction(), primeCompany(), renderAjaxWidget(), renderAjaxWidgetIfAsync(), reorderWidgets(), setDefaultView(), setMaintenance(), setMessage(), setNavActive(), setTheme(), setWidgetState(), toggleWidget(), triggerPreAction(), verifyCsrfToken()

Methods inherited from Controller

clearCache(), components(), draw(), emptyCache(), helpers(), index(), partial(), redirect(), render(), set(), setDefaultViewPath(), startCaching(), stopCaching(), uses()

Magic methods summary

Properties summary

Properties inherited from AppController

$admin_uri, $base_uri, $base_url, $client_uri, $company_id, $components, $helpers, $layout, $request_uri, $server_protocol

Properties inherited from Controller

$action, $controller, $files, $get, $is_cli, $plugin, $post, $structure, $structure_view, $uri, $uri_str, $uses, $view

Blesta API documentation generated by ApiGen 2.8.0