protected function _crumbs_InvokeAction_define::_addRule in Crumbs, the Breadcrumbs suite 6.2
2 calls to _crumbs_InvokeAction_define::_addRule()
File
- ./
crumbs.admin.inc, line 229
Class
- _crumbs_InvokeAction_define
- This class uses the InvokeAction pattern, but it does not implement any of the InvokeAction interfaces. This is because it is not supposed to be used with the PluginEngine, but rather from a custom function (see above).
Code
protected function _addRule($key, $title) {
$fragments = explode('.', $key);
$partial_key = array_shift($fragments);
while (TRUE) {
if (empty($fragments)) {
break;
}
$wildcard_key = $partial_key . '.*';
$this->_keys[$wildcard_key] = TRUE;
$this->_keysByPlugin[$this->_pluginKey][$wildcard_key] = TRUE;
$partial_key .= '.' . array_shift($fragments);
}
$this->_keys[$key] = $title;
$this->_keysByPlugin[$this->_pluginKey][$key] = $title;
}