private function canSubmitForm(\DOMElement $node)
    {
        $type = $node->hasAttribute('type') ? $node->getAttribute('type') : null;

        if ('input' === $node->nodeName && in_array($type, array('submit', 'image'), true)) {
            return true;
        }

        return 'button' === $node->nodeName && (null === $type || 'submit' === $type);
    }
private function canSubmitForm(\DOMElement $node)
    {
        $type = $node->hasAttribute('type') ? $node->getAttribute('type') : null;

        if ('input' === $node->nodeName && in_array($type, array('submit', 'image'), true)) {
            return true;
        }

        return 'button' === $node->nodeName && (null === $type || 'submit' === $type);
    }
private function canSubmitForm ( \ DOMElement $ node ) { $ type = $ node -> hasAttribute ( 'type' ) ? $ node -> getAttribute ( 'type' ) : null ; if ( 'input' === $ node -> nodeName && in_array ( $ type , array ( 'submit' , 'image' ) , true ) ) { return true ; } return 'button' === $ node -> nodeName && ( null === $ type || 'submit' === $ type ) ; }
Determines if a node can submit a form.

@param \DOMElement $node Node.

@return boolean
Determines if a node can submit a form .