public function redirect(AnCommandContext $context)
    {
        if ($context->action === 'edit' || $context->action === 'add') {
            $context->response->setRedirect(route($this->getItem()->getURL().'&layout=edit'));
        } else {
            return parent::redirect($context);
        }
    }
public function redirect(AnCommandContext $context)
    {
        if ($context->action === 'edit' || $context->action === 'add') {
            $context->response->setRedirect(route($this->getItem()->getURL().'&layout=edit'));
        } else {
            return parent::redirect($context);
        }
    }
public function redirect ( AnCommandContext $ context ) { if ( $ context -> action === 'edit' || $ context -> action === 'add' ) { $ context -> response -> setRedirect ( route ( $ this -> getItem ( ) -> getURL ( ) . '&layout=edit' ) ) ; } else { return parent :: redirect ( $ context ) ; } }
Article post action.

@param AnCommandContext $context Context parameter
Article post action .