mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 20:11:46 +02:00
Minor adjustments
This commit is contained in:
@@ -692,6 +692,7 @@ class FieldtypeRepeater extends Fieldtype implements ConfigurableModule {
|
|||||||
|
|
||||||
public function ___exportValue(Page $page, Field $field, $value, array $options = array()) {
|
public function ___exportValue(Page $page, Field $field, $value, array $options = array()) {
|
||||||
$a = array();
|
$a = array();
|
||||||
|
if(!WireArray::iterable($value)) return $a;
|
||||||
foreach($value as $k => $p) {
|
foreach($value as $k => $p) {
|
||||||
/** @var Page $p */
|
/** @var Page $p */
|
||||||
if($p->isUnpublished()) continue;
|
if($p->isUnpublished()) continue;
|
||||||
|
@@ -327,7 +327,7 @@ class InputfieldSelect extends Inputfield {
|
|||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected function getOptionAttributes($key) {
|
public function getOptionAttributes($key) {
|
||||||
if(!isset($this->optionAttributes[$key])) return array();
|
if(!isset($this->optionAttributes[$key])) return array();
|
||||||
return $this->optionAttributes[$key];
|
return $this->optionAttributes[$key];
|
||||||
}
|
}
|
||||||
@@ -395,6 +395,7 @@ class InputfieldSelect extends Inputfield {
|
|||||||
|
|
||||||
public function get($key) {
|
public function get($key) {
|
||||||
if($key == 'options') return $this->options;
|
if($key == 'options') return $this->options;
|
||||||
|
if($key == 'optionAttributes') return $this->optionAttributes;
|
||||||
return parent::get($key);
|
return parent::get($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user