Download Creating Kaltura Server Plugins: User Manual - Eagle

Transcript
How to Write a Plugin
API Service
(Recommendation) Create your service class under the my_plugin/services folder.
Implement IKalturaServices to return the list of services implemented in your plugin.
Configure a generator.ini (under my_plugin/config) file to include or exclude your services and actions
from generated client libraries and implement IKalturaConfigurator to return the configuration to the
client generator.
Batch Worker
Implement your worker classes (recommendation: place worker classes under my_plugin/batch).
To use these workers, configure your batch_config.ini file.
Conversion Engine
1. Implement KOperationEngine.
2. Implement KDLOperatorBase.
3. Implement IKalturaObjectLoader to return your implementation of KOperationEngine and
KDLOperatorBase.
4. Implement IKalturaEnumerator to return additional conversion engine types for the
conversionEngineType enum.
Admin Console Page
1. Implement KalturaAdminConsolePlugin to load your Admin Console action data.
Recommendation: Place the action data under the my_plugin/admin folder. For example,
my_plugin/admin/MyPluginCustomAction.php
2. Create a template phtml file and ensure that your implementation of
KalturaAdminConsolePlugin points to its path in the getTemplatePath method.
For example, my_plugin/admin/scripts/plugin/my-plugin-custom-action.phtml.
Recommendation: In the template file name, include contain lower-case letters; use a capital
letter in the action file for a new word and separate the words with a dash (-).
3. Implement IKalturaAdminConsolePages to return the new Admin Console pages.
Entry Investigation Information
1. Implement Kaltura_View_Helper_EntryInvestigatePlugin to return the data array
to be applied to the template and the template to be used to generate the HTML.
2. Implement the PHTML template.
3. Implement IKalturaAdminConsoleEntryInvestigate to return your implementation of
Kaltura_View_Helper_EntryInvestigatePlugin.
Admin Console Publisher Action
1. Implement Admin Console Page.
2. Ensure that your implementation of KalturaAdminConsolePlugin also implements
IKalturaAdminConsolePublisherAction to return the list of options to be added and the
JavaScript code to be added to the page.
Creating Kaltura Server Plugins User Manual
44