About Panel Extensions
A Panel extension, as the name suggests, is a third-party software that adds new functionality to Panel. The former name of Panel extensions is modules. Typical examples of extensions are help desk and ticket system solutions. On the one hand, these solutions access information about Panel entities, particularly, user accounts, and on the other hand they provide their own tools to help administrators and customers communicate with each other.
Extensions are written in PHP and their organization to a large extent reuses Zend framework practices, for example, the implementation of MVC and forms construction. Using these practices is recommended, however, is not required. Because PHP is mandatory for writing extensions, we assume that a reader of this document has knowledge of the programming language. If you haven't written PHP applications before, you can still use the document, but you might need to read some PHP-specific topics (which are beyond of the document scope) to develop the extension you need.
How to Create and Install Extensions
A ready to distribution extension is a ZIP archive which contains specifically-organized directory structure and a file with meta information describing the software. A fast way to create an extension is to call the
extension command-line utility (
extension --create <EXTENSION_NAME>). This call will create the necessary file structure. Read more about organization of extension files in Extension Structure.
The extensions are normally installed by the administrator in Panel, in Server Management > Extensions (in the left navigation menu).
Get Started with Extensions Development
The most rapid way to start developing extensions is to read the Quick Start chapter. This chapter guides you through the process of developing simple extensions and provides concrete examples of using Panel features in combination with conceptual information and best practices of how to work with the SDK.
Panel Features Available to Extensions
An extension can receive information about Panel entities, react to different system events, and do even some more through Panel interfaces. The full list of available interfaces is as follows:
This interface allows extensions to get administrative control over Panel entities and manage them by exchanging operation requests wrapped into XML-structured packets. Panel receives such an XML-structured operation request, processes it, and responds with a PHP class which fields mimic the XML tree structure. A Panel response includes an operation status and operation-related details. For example, if you request information about a customer account, the account details will be returned. Read how to use this interface.
- Command-Line Interface (CLI).
This interface allows extensions to perform operations on Panel objects from the command line on behalf of the administrator. You can use this interface only in certain places of extension code, particularly, in pre-installation, post-installation, and removal scripts. Read how to use this interface.
Extensions can put some of their persistent data, for example, their settings in the key-value storage (provided by Panel) and then easily get the data on demand. Read how to use this interface.
This interface lets extensions subscribe to a particular Panel event and trigger a particular action depending on the event information. Read how to use this interface.
Using this interface, extensions can run periodic tasks, for example, to collect daily statistics or analyze data. Read how to use this interface.
Using this interface, extensions can advertise themselves by adding promotional blocks to the Administrator's dashboard (the Home page). Read how to use this interface.
Extensions can automatically display their messages in the language selected in Panel. Read how to use this interface.
This interface allows invocation of custom mail handlers at various stages of mail processing by the Mail Transfer Agent (MTA) to manage incoming, outgoing, and pass-through mail. Read how to use this interface.
Panel gives you the option to use external third-party DNS servers to resolve domain names of websites hosted on the Panel server. Read how to use this interface.
In order to test an extension, you should install it to Panel. To provide you with more debug information, we recommend that you increase the verbosity of the debugging information in Panel. Learn how to do it.
Resources and Further Learning
This document covers only basic functionality the SDK provides. Too view the complete list of Panel tools an extension can use, read the auto-generated Reference document and review the extension samples.