original_string: public function render(array $data, ContextInterface $context)
      {
          $data += [
              'name' => '',
              'val' => null,
              'type' => 'text',
              'escape' => true,
          ];
          $data['value'] = $data['val'];
          $data['readonly'] = 'readonly';
          unset($data['val']);
          $this->_loadAssets();
  
          $data['class'] = !empty($data['class']) ? "{$data['class']} fontselector" : 'fontselector';
  
          return $this->_templates->format('input', [
              'name' => $data['name'],
              'type' => 'text',
              'attrs' => $this->_templates->formatAttributes(
                  $data,
                  ['name', 'type']
              ),
          ]) . '<p id="' . $data['id'] . '-preview" style="font:' . $data['value'] . ';">Example text</p>';
      }
code: public function render(array $data, ContextInterface $context)
      {
          $data += [
              'name' => '',
              'val' => null,
              'type' => 'text',
              'escape' => true,
          ];
          $data['value'] = $data['val'];
          $data['readonly'] = 'readonly';
          unset($data['val']);
          $this->_loadAssets();
  
          $data['class'] = !empty($data['class']) ? "{$data['class']} fontselector" : 'fontselector';
  
          return $this->_templates->format('input', [
              'name' => $data['name'],
              'type' => 'text',
              'attrs' => $this->_templates->formatAttributes(
                  $data,
                  ['name', 'type']
              ),
          ]) . '<p id="' . $data['id'] . '-preview" style="font:' . $data['value'] . ';">Example text</p>';
      }
code_tokens: public function render ( array $ data , ContextInterface $ context ) { $ data += [ 'name' => '' , 'val' => null , 'type' => 'text' , 'escape' => true , ] ; $ data [ 'value' ] = $ data [ 'val' ] ; $ data [ 'readonly' ] = 'readonly' ; unset ( $ data [ 'val' ] ) ; $ this -> _loadAssets ( ) ; $ data [ 'class' ] = ! empty ( $ data [ 'class' ] ) ? "{$data['class']} fontselector" : 'fontselector' ; return $ this -> _templates -> format ( 'input' , [ 'name' => $ data [ 'name' ] , 'type' => 'text' , 'attrs' => $ this -> _templates -> formatAttributes ( $ data , [ 'name' , 'type' ] ) , ] ) . '<p id="' . $ data [ 'id' ] . '-preview" style="font:' . $ data [ 'value' ] . ';">Example text</p>' ; }
docstring: Render a color picker widget.
  
  @param array $data The data to build an input with.
  @param \Cake\View\Form\ContextInterface $context The current form context.
  @return string
docstring_tokens: Render a color picker widget .