original_string: protected function _renderInputs($data, $context)
      {
          $out = [];
          foreach ($data['options'] as $key => $val) {
              // Grouped inputs in a fieldset.
              if (is_string($key) && is_array($val) && !isset($val['text'], $val['value'])) {
                  $inputs = $this->_renderInputs(['options' => $val] + $data, $context);
                  $title = $this->_templates->format('multicheckboxTitle', ['text' => $key]);
                  $out[] = $this->_templates->format('multicheckboxWrapper', [
                      'content' => $title . implode('', $inputs)
                  ]);
                  continue;
              }
  
              // Standard inputs.
              $checkbox = [
                  'value' => $key,
                  'text' => $val,
              ];
              if (is_array($val) && isset($val['text'], $val['value'])) {
                  $checkbox = $val;
              }
              if (!isset($checkbox['templateVars'])) {
                  $checkbox['templateVars'] = $data['templateVars'];
              }
              if (!isset($checkbox['label'])) {
                  $checkbox['label'] = $data['label'];
              }
              if (!empty($data['templateVars'])) {
                  $checkbox['templateVars'] = array_merge($data['templateVars'], $checkbox['templateVars']);
              }
              $checkbox['name'] = $data['name'];
              $checkbox['escape'] = $data['escape'];
              $checkbox['checked'] = $this->_isSelected($checkbox['value'], $data['val']);
              $checkbox['disabled'] = $this->_isDisabled($checkbox['value'], $data['disabled']);
              if (empty($checkbox['id'])) {
                  $checkbox['id'] = $this->_id($checkbox['name'], $checkbox['value']);
              }
              $out[] = $this->_renderInput($checkbox + $data, $context);
          }
  
          return $out;
      }
code: protected function _renderInputs($data, $context)
      {
          $out = [];
          foreach ($data['options'] as $key => $val) {
              // Grouped inputs in a fieldset.
              if (is_string($key) && is_array($val) && !isset($val['text'], $val['value'])) {
                  $inputs = $this->_renderInputs(['options' => $val] + $data, $context);
                  $title = $this->_templates->format('multicheckboxTitle', ['text' => $key]);
                  $out[] = $this->_templates->format('multicheckboxWrapper', [
                      'content' => $title . implode('', $inputs)
                  ]);
                  continue;
              }
  
              // Standard inputs.
              $checkbox = [
                  'value' => $key,
                  'text' => $val,
              ];
              if (is_array($val) && isset($val['text'], $val['value'])) {
                  $checkbox = $val;
              }
              if (!isset($checkbox['templateVars'])) {
                  $checkbox['templateVars'] = $data['templateVars'];
              }
              if (!isset($checkbox['label'])) {
                  $checkbox['label'] = $data['label'];
              }
              if (!empty($data['templateVars'])) {
                  $checkbox['templateVars'] = array_merge($data['templateVars'], $checkbox['templateVars']);
              }
              $checkbox['name'] = $data['name'];
              $checkbox['escape'] = $data['escape'];
              $checkbox['checked'] = $this->_isSelected($checkbox['value'], $data['val']);
              $checkbox['disabled'] = $this->_isDisabled($checkbox['value'], $data['disabled']);
              if (empty($checkbox['id'])) {
                  $checkbox['id'] = $this->_id($checkbox['name'], $checkbox['value']);
              }
              $out[] = $this->_renderInput($checkbox + $data, $context);
          }
  
          return $out;
      }
code_tokens: protected function _renderInputs ( $ data , $ context ) { $ out = [ ] ; foreach ( $ data [ 'options' ] as $ key => $ val ) { // Grouped inputs in a fieldset. if ( is_string ( $ key ) && is_array ( $ val ) && ! isset ( $ val [ 'text' ] , $ val [ 'value' ] ) ) { $ inputs = $ this -> _renderInputs ( [ 'options' => $ val ] + $ data , $ context ) ; $ title = $ this -> _templates -> format ( 'multicheckboxTitle' , [ 'text' => $ key ] ) ; $ out [ ] = $ this -> _templates -> format ( 'multicheckboxWrapper' , [ 'content' => $ title . implode ( '' , $ inputs ) ] ) ; continue ; } // Standard inputs. $ checkbox = [ 'value' => $ key , 'text' => $ val , ] ; if ( is_array ( $ val ) && isset ( $ val [ 'text' ] , $ val [ 'value' ] ) ) { $ checkbox = $ val ; } if ( ! isset ( $ checkbox [ 'templateVars' ] ) ) { $ checkbox [ 'templateVars' ] = $ data [ 'templateVars' ] ; } if ( ! isset ( $ checkbox [ 'label' ] ) ) { $ checkbox [ 'label' ] = $ data [ 'label' ] ; } if ( ! empty ( $ data [ 'templateVars' ] ) ) { $ checkbox [ 'templateVars' ] = array_merge ( $ data [ 'templateVars' ] , $ checkbox [ 'templateVars' ] ) ; } $ checkbox [ 'name' ] = $ data [ 'name' ] ; $ checkbox [ 'escape' ] = $ data [ 'escape' ] ; $ checkbox [ 'checked' ] = $ this -> _isSelected ( $ checkbox [ 'value' ] , $ data [ 'val' ] ) ; $ checkbox [ 'disabled' ] = $ this -> _isDisabled ( $ checkbox [ 'value' ] , $ data [ 'disabled' ] ) ; if ( empty ( $ checkbox [ 'id' ] ) ) { $ checkbox [ 'id' ] = $ this -> _id ( $ checkbox [ 'name' ] , $ checkbox [ 'value' ] ) ; } $ out [ ] = $ this -> _renderInput ( $ checkbox + $ data , $ context ) ; } return $ out ; }
docstring: Render the checkbox inputs.
  
  @param array $data The data array defining the checkboxes.
  @param \Cake\View\Form\ContextInterface $context The current form context.
  @return array An array of rendered inputs.
docstring_tokens: Render the checkbox inputs .