You are here

function crumbs_RuleWeightKeeper::findWeight in Crumbs, the Breadcrumbs suite 7

Same name and namespace in other branches
  1. 6.2 crumbs.plugin_engine.inc \crumbs_RuleWeightKeeper::findWeight()

Determine the weight for the rule specified by the key.

File

lib/RuleWeightKeeper.php, line 53

Class

crumbs_RuleWeightKeeper

Code

function findWeight($key = NULL) {
  if (!isset($key)) {
    return $this->ruleWeights[''];
  }
  if (isset($this->ruleWeights[$key])) {
    return $this->ruleWeights[$key];
  }
  return $this
    ->_findWildcardWeight($key);
}