mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Add __debugInfo() method to Inputfield class
This commit is contained in:
@@ -1840,6 +1840,29 @@ abstract class Inputfield extends WireData implements Module {
|
||||
if(!is_null($setEditable)) $this->editable = $setEditable ? true : false;
|
||||
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.
|
||||
|
Reference in New Issue
Block a user