Calling dynamic methods for extended components

In the spirit of #2288
This commit is contained in:
Samuel Georges 2016-08-06 09:55:42 +10:00
parent c5bc6612d0
commit 556b951e63
1 changed files with 2 additions and 2 deletions

View File

@ -1268,13 +1268,13 @@ class Controller
public function findComponentByHandler($handler)
{
foreach ($this->page->components as $component) {
if (method_exists($component, $handler)) {
if ($component->methodExists($handler)) {
return $component;
}
}
foreach ($this->layout->components as $component) {
if (method_exists($component, $handler)) {
if ($component->methodExists($handler)) {
return $component;
}
}