function crumbs_EntityPlugin_Callback::entityFindCandidate in Crumbs, the Breadcrumbs suite 7.2
@inheritdoc
Overrides crumbs_EntityPlugin::entityFindCandidate
File
- lib/
EntityPlugin/ Callback.php, line 60
Class
Code
function entityFindCandidate($entity, $entity_type, $distinction_key) {
if (!isset($this->callback)) {
// Restore the callback after serialization.
$this->callback = crumbs()->callbackRestoration
->restoreCallback($this->module, $this->key, $this->callbackType);
}
if (!empty($this->callback)) {
return call_user_func($this->callback, $entity, $entity_type, $distinction_key);
}
return NULL;
}