function EventInfoController::resolveCallableName

Same name in other branches
  1. 5.x src/Controller/EventInfoController.php \Drupal\devel\Controller\EventInfoController::resolveCallableName()

Helper function for resolve callable name.

Parameters

mixed $callable: The for which resolve the name. Can be either the name of a function stored in a string variable, or an object and the name of a method within the object.

Return value

string The resolved callable name or an empty string.

1 call to EventInfoController::resolveCallableName()
EventInfoController::eventList in src/Controller/EventInfoController.php
Builds the events overview page.

File

src/Controller/EventInfoController.php, line 114

Class

EventInfoController
Provides route responses for the event info page.

Namespace

Drupal\devel\Controller

Code

protected function resolveCallableName($callable) {
    if (is_callable($callable, TRUE, $callable_name)) {
        return $callable_name;
    }
    return '';
}