interface RulesPluginUIInterface

Plugin UI Interface.

Hierarchy

Expanded class hierarchy of RulesPluginUIInterface

All classes that implement RulesPluginUIInterface

File

ui/ui.core.inc, line 11

View source
interface RulesPluginUIInterface {
    
    /**
     * Adds the whole configuration form of this rules configuration.
     *
     * For rule elements that are part of a configuration this method just adds
     * the elements configuration form.
     *
     * @param array $form
     *   The form array where to add the form.
     * @param array $form_state
     *   The current form state.
     * @param array $options
     *   An optional array of options with the known keys:
     *    - 'show settings': Whether to include the 'settings' fieldset for
     *      editing configuration settings like the label or categories. Defaults
     *      to FALSE.
     *    - 'button': Whether a submit button should be added. Defaults to FALSE.
     *    - 'init': Whether the element is about to be configured the first time
     *      and the configuration is about to be initialized. Defaults to FALSE.
     *    - 'restrict plugins: May be used to restrict the list of rules plugins
     *      that may be added to this configuration. For that set an array of
     *      valid plugins. Note that conditions and actions are always valid, so
     *      just set an empty array for just allowing those.
     *    - 'restrict conditions': Optionally set an array of condition names to
     *      restrict the conditions that are available for adding.
     *    - 'restrict actions': Optionally set an array of action names to
     *      restrict the actions that are available to for adding.
     *    - 'restrict events': Optionally set an array of event names to restrict
     *      the events that are available for adding.
     *
     * @todo Implement the 'restrict *' options.
     */
    public function form(&$form, &$form_state, $options = array());
    
    /**
     * Validate the configuration form of this rule element.
     *
     * @param array $form
     *   The form array.
     * @param array $form_state
     *   The current form state.
     */
    public function form_validate($form, &$form_state);
    
    /**
     * Form submit handler for the element configuration form.
     *
     * Submit the configuration form of this rule element. This makes sure to
     * put the updated configuration in the form state. For saving changes
     * permanently, just call $config->save() afterwards.
     *
     * @param array $form
     *   The form array.
     * @param array $form_state
     *   The current form state.
     */
    public function form_submit($form, &$form_state);
    
    /**
     * Returns a structured array for rendering this element in overviews.
     */
    public function buildContent();
    
    /**
     * Returns the help text for editing this plugin.
     */
    public function help();
    
    /**
     * Returns ui operations for this element.
     */
    public function operations();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
RulesPluginUIInterface::buildContent public function Returns a structured array for rendering this element in overviews. 1
RulesPluginUIInterface::form public function Adds the whole configuration form of this rules configuration. 1
RulesPluginUIInterface::form_submit public function Form submit handler for the element configuration form. 1
RulesPluginUIInterface::form_validate public function Validate the configuration form of this rule element. 1
RulesPluginUIInterface::help public function Returns the help text for editing this plugin. 1
RulesPluginUIInterface::operations public function Returns ui operations for this element. 1