src/Charcoal/Ui/FormGroup/FormGroupTrait.php
public function inputs(callable $inputCallback = null)
    {
        $groups = $this->groups;
        uasort($groups, [ $this, 'sortItemsByPriority' ]);

        $inputCallback = isset($inputCallback) ? $inputCallback : $this->inputCallback;
        foreach ($inputs as $input) {
            if (!$input->l10nMode()) {
                $input->setL10nMode($this->l10nMode());
            }
            if ($inputCallback) {
                $inputCallback($input);
            }
            $GLOBALS['widget_template'] = $input->template();
            yield $input->ident() => $input;
            $GLOBALS['widget_template'] = '';
        }
    }
public function inputs(callable $inputCallback = null)
    {
        $groups = $this->groups;
        uasort($groups, [ $this, 'sortItemsByPriority' ]);

        $inputCallback = isset($inputCallback) ? $inputCallback : $this->inputCallback;
        foreach ($inputs as $input) {
            if (!$input->l10nMode()) {
                $input->setL10nMode($this->l10nMode());
            }
            if ($inputCallback) {
                $inputCallback($input);
            }
            $GLOBALS['widget_template'] = $input->template();
            yield $input->ident() => $input;
            $GLOBALS['widget_template'] = '';
        }
    }
public function inputs ( callable $ inputCallback = null ) { $ groups = $ this -> groups ; uasort ( $ groups , [ $ this , 'sortItemsByPriority' ] ) ; $ inputCallback = isset ( $ inputCallback ) ? $ inputCallback : $ this -> inputCallback ; foreach ( $ inputs as $ input ) { if ( ! $ input -> l10nMode ( ) ) { $ input -> setL10nMode ( $ this -> l10nMode ( ) ) ; } if ( $ inputCallback ) { $ inputCallback ( $ input ) ; } $ GLOBALS [ 'widget_template' ] = $ input -> template ( ) ; yield $ input -> ident ( ) => $ input ; $ GLOBALS [ 'widget_template' ] = '' ; } }
Form Input generator.

@param callable $inputCallback Optional. Input callback.
@return FormGroupInterface[]|Generator
Form Input generator .