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

  • Plugin
  • Plugins

Class Plugin

Abstract class that all Plugin handlers extend

Defines all methods plugin handlers must inherit and provides all methods common between all plugin handlers

Abstract
Package: blesta\components\plugins
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at components/plugins/lib/plugin.php

Methods summary

public string
# getName( )

Returns the name of this plugin

Returns the name of this plugin

Returns

string
The common name of this plugin
public string
# getVersion( )

Returns the version of this plugin

Returns the version of this plugin

Returns

string
The current version of this plugin
public array
# getAuthors( )

Returns the name and URL for the authors of this plugin

Returns the name and URL for the authors of this plugin

Returns

array
The name and URL of the authors of this plugin
public
# install( integer $plugin_id )

Performs any necessary bootstraping actions

Performs any necessary bootstraping actions

Parameters

$plugin_id
integer
$plugin_id The ID of the plugin being installed
public
# upgrade( string $current_version, integer $plugin_id )

Performs migration of data from $current_version (the current installed version) to the given file set version

Performs migration of data from $current_version (the current installed version) to the given file set version

Parameters

$current_version
string
$current_version The current installed version of this plugin
$plugin_id
integer
$plugin_id The ID of plugin being upgraded
public
# uninstall( integer $plugin_id, boolean $last_instance )

Performs any necessary cleanup actions

Performs any necessary cleanup actions

Parameters

$plugin_id
integer
$plugin_id The ID of the plugin being uninstalled
$last_instance
boolean
$last_instance True if $plugin_id is the last instance across all companies for this plugin, false otherwise
public array
# getActions( )

Returns all actions to be configured for this widget (invoked after install() or upgrade(), overwrites all existing actions)

Returns all actions to be configured for this widget (invoked after install() or upgrade(), overwrites all existing actions)

Returns

array
A numerically indexed array containing: - action The action to register for - uri The URI to be invoked for the given action - name The name to represent the action (can be language definition) - options An array of key/value pair options for the given action
public array
# getEvents( )

Returns all events to be registered for this plugin (invoked after install() or upgrade(), overwrites all existing events)

Returns all events to be registered for this plugin (invoked after install() or upgrade(), overwrites all existing events)

Returns

array
A numerically indexed array containing: - event The event to register for - callback A string or array representing a callback function or class/method. If a user (e.g. non-native PHP) function or class/method, the plugin must automatically define it when the plugin is loaded. To invoke an instance methods pass "this" instead of the class name as the 1st callback element.
public string
# getLogo( )

Returns the relative path from this plugin's directory to the logo for this plugin. Defaults to views/default/images/logo.png

Returns the relative path from this plugin's directory to the logo for this plugin. Defaults to views/default/images/logo.png

Returns

string
The relative path to the plugin's logo
public
# cron( string $key )

Runs the cron task identified by the key used to create the cron task

Runs the cron task identified by the key used to create the cron task

Parameters

$key
string
$key The key used to create the cron task

See

CronTasks::add()
public mixed
# errors( )

Return all validation errors encountered

Return all validation errors encountered

Returns

mixed
Boolean false if no errors encountered, an array of errors otherwise
protected
# loadConfig( string $file )

Loads a given config file

Loads a given config file

Parameters

$file
string
$file The full path to the config file to load

Magic methods summary

Properties summary

protected stdClass $config
#

A stdClass object representing the configuration for this plugin

A stdClass object representing the configuration for this plugin

Blesta API documentation generated by ApiGen 2.8.0