From 468ecb6b2988ac7dce4de26a7d935bcef0a2f2c4 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Wed, 12 Sep 2018 13:20:26 -0400 Subject: [PATCH] Make ProcessPageSearchLive::execute() hookable per processwire/processwire-issues#675 --- .../Process/ProcessPageSearch/ProcessPageSearchLive.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php b/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php index 1b70dda3..cd9bff0e 100644 --- a/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php +++ b/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php @@ -5,6 +5,7 @@ * * @method renderList(array $items, $prefix = 'pw-search', $class = 'list') * @method renderItem(array $item, $prefix = 'pw-search', $class = 'list') + * @method string|array execute($getJSON = true) * * @todo support searching repeaters * @@ -394,7 +395,7 @@ class ProcessPageSearchLive extends Wire { * @return string|array * */ - public function execute($getJSON = true) { + public function ___execute($getJSON = true) { /** @var WireInput $input */ $input = $this->wire('input'); @@ -785,7 +786,7 @@ class ProcessPageSearchLive extends Wire { * */ protected function useType($type, $requestType = '') { - if($type === $requestType) return true; + if($requestType) return $type === $requestType; return !in_array($type, $this->noSearchTypes); }