mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 01:34:31 +02:00
Add __debugInfo() method to Inputfield class
This commit is contained in:
@@ -1841,6 +1841,29 @@ abstract class Inputfield extends WireData implements Module {
|
|||||||
return $this->editable;
|
return $this->editable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* debugInfo PHP 5.6+ magic method
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __debugInfo() {
|
||||||
|
$info = array(
|
||||||
|
'className' => $this->className(),
|
||||||
|
'attributes' => $this->attributes,
|
||||||
|
'wrapAttributes' => $this->wrapAttributes,
|
||||||
|
);
|
||||||
|
if(is_object($this->parent)) {
|
||||||
|
$info['parent'] = array(
|
||||||
|
'className' => $this->parent->className(),
|
||||||
|
'name' => $this->parent->attr('name'),
|
||||||
|
'id' => $this->parent->attr('id'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$info = array_merge($info, parent::__debugInfo());
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set custom html render, see $this->html at top for reference.
|
* Set custom html render, see $this->html at top for reference.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user