protected _fields ( array $fields, array $options = [] ) : string | ||
$fields | array | An array of fields to render. |
$options | array | The array of options to apply to all fields in the `$fields` array. See the `$options` parameter of the `field` method for more information. |
Résultat | string | Returns the fields rendered by `field()`, each separated by a newline. |
protected function _fields(array $fields, array $options = array())
{
$result = array();
foreach ($fields as $field => $label) {
if (is_numeric($field)) {
$field = $label;
unset($label);
}
$result[] = $this->field($field, compact('label') + $options);
}
return join("\n", $result);
}