mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 01:34:31 +02:00
Add interface for Inputfields that accept page selector
This commit is contained in:
@@ -481,7 +481,8 @@ abstract class Inputfield extends WireData implements Module {
|
|||||||
if(strlen($value)) return $value;
|
if(strlen($value)) return $value;
|
||||||
if($this->skipLabel & self::skipLabelBlank) return '';
|
if($this->skipLabel & self::skipLabelBlank) return '';
|
||||||
return $this->attributes['name'];
|
return $this->attributes['name'];
|
||||||
}
|
}
|
||||||
|
if($key === 'description' || $key === 'notes') return parent::get($key);
|
||||||
if($key === 'name' || $key === 'value' || $key === 'id') return $this->getAttribute($key);
|
if($key === 'name' || $key === 'value' || $key === 'id') return $this->getAttribute($key);
|
||||||
if($key === 'attributes') return $this->attributes;
|
if($key === 'attributes') return $this->attributes;
|
||||||
if($key === 'parent') return $this->parent;
|
if($key === 'parent') return $this->parent;
|
||||||
|
@@ -575,6 +575,23 @@ interface InputfieldSupportsArrayValue {
|
|||||||
public function setArrayValue(array $value);
|
public function setArrayValue(array $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inputfield that supports a Page selector for selectable options
|
||||||
|
*
|
||||||
|
* @since 3.0.176
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
interface InputfieldSupportsPageSelector {
|
||||||
|
/**
|
||||||
|
* Set page selector or test if feature is disabledd
|
||||||
|
*
|
||||||
|
* @param string $selector Selector string or blank string when testing if feature is disabled
|
||||||
|
* @return bool Return boolean false if feature disabled, otherwise boolean true
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function setPageSelector($selector);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inputfield that has a text value by default
|
* Inputfield that has a text value by default
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user