public function alterSubmit(MethodInvocation $invocation)
    {
        $helper = $invocation->getThis();
        list($caption, $options) = array_pad($invocation->getArguments(), 2, null);
        $options = (array)$options;
        $options = $this->_addClass($helper, $options, 'btn btn-primary');

        $this->_addTemplates($helper);
        $this->setProperty($invocation, 'arguments', [$caption, $options]);

        return $invocation->proceed();
    }
public function alterSubmit(MethodInvocation $invocation)
    {
        $helper = $invocation->getThis();
        list($caption, $options) = array_pad($invocation->getArguments(), 2, null);
        $options = (array)$options;
        $options = $this->_addClass($helper, $options, 'btn btn-primary');

        $this->_addTemplates($helper);
        $this->setProperty($invocation, 'arguments', [$caption, $options]);

        return $invocation->proceed();
    }
public function alterSubmit ( MethodInvocation $ invocation ) { $ helper = $ invocation -> getThis ( ) ; list ( $ caption , $ options ) = array_pad ( $ invocation -> getArguments ( ) , 2 , null ) ; $ options = ( array ) $ options ; $ options = $ this -> _addClass ( $ helper , $ options , 'btn btn-primary' ) ; $ this -> _addTemplates ( $ helper ) ; $ this -> setProperty ( $ invocation , 'arguments' , [ $ caption , $ options ] ) ; return $ invocation -> proceed ( ) ; }
Appends some CSS classes to submit buttons.

@param \Go\Aop\Intercept\MethodInvocation $invocation Invocation
@Around("execution(public Cake\View\Helper\FormHelper->submit(*))")
@return bool Whether object invocation should proceed or not
Appends some CSS classes to submit buttons .