1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00

Make the Page::getInputfields() method hookable

This commit is contained in:
Ryan Cramer
2024-05-17 11:08:33 -04:00
parent eaed402cfb
commit 172ad1c812

View File

@@ -3020,6 +3020,23 @@ class Page extends WireData implements \Countable, WireMatchable {
*
*/
public function getInputfields($fieldName = '') {
if($this->wire()->hooks->isMethodHooked($this, 'getInputfields')) {
return $this->__call('getInputfields', array($fieldName));
} else {
return $this->___getInputfields($fieldName);
}
}
/**
* Hookable version of getInputfields() method.
*
* See the getInputfields() method above for documentation details.
*
* @param string|array $fieldName
* @return null|InputfieldWrapper Returns an InputfieldWrapper array of Inputfield objects, or NULL on failure.
*
*/
protected function ___getInputfields($fieldName = '') {
return $this->values()->getInputfields($this, $fieldName);
}