public function render(array $data, ContextInterface $context)
    {
        $data = optionsParser($data, [
            'name' => '',
            'val' => null,
            'type' => 'text',
            'escape' => true,
            'templateVars' => [],
        ]);
        $data->add('value', $data->consume('val'));

        return $this->_templates->format('hidden', [
            'name' => $data->get('name'),
            'type' => $data->get('type'),
            'templateVars' => $data->get('templateVars'),
            'attrs' => $this->_templates->formatAttributes($data->toArray(), ['name', 'type']),
        ]);
    }
public function render(array $data, ContextInterface $context)
    {
        $data = optionsParser($data, [
            'name' => '',
            'val' => null,
            'type' => 'text',
            'escape' => true,
            'templateVars' => [],
        ]);
        $data->add('value', $data->consume('val'));

        return $this->_templates->format('hidden', [
            'name' => $data->get('name'),
            'type' => $data->get('type'),
            'templateVars' => $data->get('templateVars'),
            'attrs' => $this->_templates->formatAttributes($data->toArray(), ['name', 'type']),
        ]);
    }
public function render ( array $ data , ContextInterface $ context ) { $ data = optionsParser ( $ data , [ 'name' => '' , 'val' => null , 'type' => 'text' , 'escape' => true , 'templateVars' => [ ] , ] ) ; $ data -> add ( 'value' , $ data -> consume ( 'val' ) ) ; return $ this -> _templates -> format ( 'hidden' , [ 'name' => $ data -> get ( 'name' ) , 'type' => $ data -> get ( 'type' ) , 'templateVars' => $ data -> get ( 'templateVars' ) , 'attrs' => $ this -> _templates -> formatAttributes ( $ data -> toArray ( ) , [ 'name' , 'type' ] ) , ] ) ; }
Render a hidden widget
@param array $data The data to build an input with
@param \Cake\View\Form\ContextInterface $context The current form context
@return string
Render a hidden widget