function crumbs_PluginOperation_findForPath::__construct in Crumbs, the Breadcrumbs suite 7
1 call to crumbs_PluginOperation_findForPath::__construct()
- crumbs_PluginOperation_findTitle::__construct in lib/
PluginOperation/ findTitle.php
1 method overrides crumbs_PluginOperation_findForPath::__construct()
- crumbs_PluginOperation_findTitle::__construct in lib/
PluginOperation/ findTitle.php
File
- lib/
PluginOperation/ findForPath.php, line 20
Class
Code
function __construct($path, $item) {
$this->path = $path;
$this->item = $item;
// Replace all characters with something that is allowed in method names.
// while avoiding false positives.
// Example: 'findParent__node_x()' should only match 'node/%',
// but not 'node-_' or 'node-x', or other exotic router paths.
// Special character router paths can not be matched by any method name,
// so you will need to use switch() or if/else on $item['path'].
$method_suffix = crumbs_build_method_suffix($item['path']);
if ($method_suffix !== FALSE) {
$this->methods[] = $this->method . '__' . $method_suffix;
}
$this->methods[] = $this->method;
}