Project

General

Profile

Actions

Item Enabling/disabling Common Interface of Plugin Subsystem

Introduction

This interface allows to implement a checkbox makes capable to select installed items for which the plugin would be active.

Rules on designing plugin installation instructions file (install.xml)

There should be 2 configuration options named {plugin_name}_items_enabled and {plugin_name}_items_implemented.

Here is an example:

<config group="ratings" name="ratings_items_enabled" type="itemscheckbox" description="List of items rating is enabled for"><![CDATA[]]></config>
<config group="ratings" name="ratings_items_implemented" type="hidden" description="List of items rating is implemented for">autos,articles,estates,listings,accounts</config>

Plugin should also handle the "phpPackageItemChangedForPlugin" hook calling.

The script provides the $data array to the code of hook.

Below is the sample contents of $data array:

Array
(
    [0] => Array
        (
            [action] => +
            [item] => listings
        )

    [1] => Array
        (
            [action] => -
            [item] => articles
        )

)
</block>

Updated by Vasily Bezruchkin about 7 years ago ยท 1 revisions