praiadeseselle/wire/modules/Inputfield/InputfieldFieldset.module

48 lines
1.2 KiB
Text
Raw Normal View History

2022-03-08 15:55:41 +01:00
<?php namespace ProcessWire;
2022-11-05 18:32:48 +01:00
/**
* Fieldset Inputfield
*
* ProcessWire 3.x, Copyright 2022 by Ryan Cramer
* https://processwire.com
*
* @property string|int $defaultValue
* @property array|string $options Get or set options, array of [value => label], or use options string.
* @property array $optionAttributes
* @property bool $valueAddOption If value attr set from API (only) that is not an option, add it as an option? (default=false) 3.0.171+
*
*/
2022-03-08 15:55:41 +01:00
class InputfieldFieldset extends InputfieldWrapper {
2022-11-05 18:32:48 +01:00
/**
* Get module info
*
* @return array
*
*/
2022-03-08 15:55:41 +01:00
public static function getModuleInfo() {
return array(
'title' => __('Fieldset', __FILE__), // Module Title
'summary' => __('Groups one or more fields together in a container', __FILE__), // Module Summary
'version' => 101,
'permanent' => true,
2022-11-05 18:32:48 +01:00
);
2022-03-08 15:55:41 +01:00
}
2022-11-05 18:32:48 +01:00
/**
* Render
*
* @return string
*
*/
2022-03-08 15:55:41 +01:00
public function ___render() {
// Note the extra "\n" is required in order to prevent InputfieldWrapper from
// skipping over an empty fieldset. Empty fieldsets are used by InputfieldRepeater
// for their description/label, and possibly others use it the same way.
return parent::___render() . "\n";
}
}