interface RulesPluginHandlerInterface

Provides the base interface for implementing abstract plugins via classes.

Hierarchy

Expanded class hierarchy of RulesPluginHandlerInterface

All classes that implement RulesPluginHandlerInterface

File

includes/rules.core.inc, line 1995

View source
interface RulesPluginHandlerInterface {
    
    /**
     * Validates $settings independent from a form submission.
     *
     * @throws RulesIntegrityException
     *   In case of validation errors, RulesIntegrityExceptions are thrown.
     */
    public function validate();
    
    /**
     * Processes settings independent from a form submission.
     *
     * Processing results may be stored and accessed on execution time
     * in $settings.
     */
    public function process();
    
    /**
     * Allows altering of the element's action/condition info.
     *
     * Note that this method is also invoked on evaluation time, thus any costly
     * operations should be avoided.
     *
     * @param $element_info
     *   A reference on the element's info as returned by RulesPlugin::info().
     */
    public function info_alter(&$element_info);
    
    /**
     * Checks whether the user has access to configure this element.
     *
     * Note that this only covers access for already created elements. In order to
     * control access for creating or using elements specify an 'access callback'
     * in the element's info array.
     *
     * @see hook_rules_action_info()
     */
    public function access();
    
    /**
     * Returns an array of required modules.
     */
    public function dependencies();
    
    /**
     * Alters the generated configuration form of the element.
     *
     * Validation and processing of the settings should be untied from the form
     * and implemented in validate() and process() wherever it makes sense.
     * For the remaining cases where form tied validation and processing is needed
     * make use of the form API #element_validate and #value_callback properties.
     */
    public function form_alter(&$form, $form_state, $options);
    
    /**
     * Returns an array of info assertions for the specified parameters.
     *
     * This allows conditions to assert additional metadata, such as info about
     * the fields of a bundle.
     *
     * @see RulesPlugin::variableInfoAssertions()
     */
    public function assertions();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
RulesPluginHandlerInterface::access public function Checks whether the user has access to configure this element. 1
RulesPluginHandlerInterface::assertions public function Returns an array of info assertions for the specified parameters. 1
RulesPluginHandlerInterface::dependencies public function Returns an array of required modules. 1
RulesPluginHandlerInterface::form_alter public function Alters the generated configuration form of the element. 1
RulesPluginHandlerInterface::info_alter public function Allows altering of the element's action/condition info. 1
RulesPluginHandlerInterface::process public function Processes settings independent from a form submission. 1
RulesPluginHandlerInterface::validate public function Validates $settings independent from a form submission. 1