function RulesPluginUI::path

Generates an operation path.

Generates a path using the given operation for the element with the given id of the configuration with the given name.

19 calls to RulesPluginUI::path()
RulesContainerPluginUI::addOperations in ui/ui.core.inc
Gets the Add-* operations for the given element.
RulesDataUI::selectionForm in ui/ui.data.inc
Provides the selection form for a parameter.
RulesPluginUI::buildContent in ui/ui.core.inc
Implements RulesPluginUIInterface.
RulesPluginUI::defaultRedirect in ui/ui.core.inc
Determines the default redirect target for an edited/deleted element.
RulesPluginUI::operations in ui/ui.core.inc
Implements RulesPluginUIInterface.

... See full list

File

ui/ui.core.inc, line 864

Class

RulesPluginUI
Faces UI extender for all kind of Rules plugins.

Code

public static function path($name, $op = NULL, RulesPlugin $element = NULL, $parameter = FALSE) {
    $element_id = isset($element) ? $element->elementId() : FALSE;
    if (isset(self::$basePath)) {
        $base_path = self::$basePath;
    }
    else {
        $base_path = isset($element) && $element instanceof RulesTriggerableInterface ? 'admin/config/workflow/rules/reaction' : 'admin/config/workflow/rules/components';
    }
    // Only append the '/manage' path if it is not already present.
    if (substr($base_path, -strlen('/manage')) != '/manage') {
        $base_path .= '/manage';
    }
    return implode('/', array_filter(array(
        $base_path,
        $name,
        $op,
        $element_id,
        $parameter,
    )));
}