protected function _getContext($data = [])
    {
        if (isset($this->_context) && empty($data)) {
            return $this->_context;
        }
        $data += ['entity' => null];

        return $this->_context = $this->contextFactory()
            ->get($this->_View->getRequest(), $data);
    }
protected function _getContext($data = [])
    {
        if (isset($this->_context) && empty($data)) {
            return $this->_context;
        }
        $data += ['entity' => null];

        return $this->_context = $this->contextFactory()
            ->get($this->_View->getRequest(), $data);
    }
protected function _getContext ( $ data = [ ] ) { if ( isset ( $ this -> _context ) && empty ( $ data ) ) { return $ this -> _context ; } $ data += [ 'entity' => null ] ; return $ this -> _context = $ this -> contextFactory ( ) -> get ( $ this -> _View -> getRequest ( ) , $ data ) ; }
Find the matching context provider for the data.

If no type can be matched a NullContext will be returned.

@param mixed $data The data to get a context provider for.
@return \Cake\View\Form\ContextInterface Context provider.
@throws \RuntimeException when the context class does not implement the
ContextInterface.
Find the matching context provider for the data .