protected function _addDefaultContextProviders()
    {
        $this->addContextProvider('orm', function ($request, $data) {
            if (is_array($data['entity']) || $data['entity'] instanceof \Traversable) {
                $pass = (new Collection($data['entity']))->first() !== null;
                if ($pass) {
                    return new EntityContext($request, $data);
                }
            }

            return $this->_addEntityContent($request, $data);
        });

        $this->_addFormContextProvider();
        $this->_addFormArrayProvider();
    }
protected function _addDefaultContextProviders()
    {
        $this->addContextProvider('orm', function ($request, $data) {
            if (is_array($data['entity']) || $data['entity'] instanceof \Traversable) {
                $pass = (new Collection($data['entity']))->first() !== null;
                if ($pass) {
                    return new EntityContext($request, $data);
                }
            }

            return $this->_addEntityContent($request, $data);
        });

        $this->_addFormContextProvider();
        $this->_addFormArrayProvider();
    }
protected function _addDefaultContextProviders ( ) { $ this -> addContextProvider ( 'orm' , function ( $ request , $ data ) { if ( is_array ( $ data [ 'entity' ] ) || $ data [ 'entity' ] instanceof \ Traversable ) { $ pass = ( new Collection ( $ data [ 'entity' ] ) ) -> first ( ) !== null ; if ( $ pass ) { return new EntityContext ( $ request , $ data ) ; } } return $ this -> _addEntityContent ( $ request , $ data ) ; } ) ; $ this -> _addFormContextProvider ( ) ; $ this -> _addFormArrayProvider ( ) ; }
Add the default suite of context providers provided.

@return  void
Add the default suite of context providers provided .