protected function _actionPost(AnCommandContext $context)
    {
        $action = $this->getItem() ? 'edit' : 'add';
        $result = $this->execute($action, $context);

        return $result;
    }
protected function _actionPost(AnCommandContext $context)
    {
        $action = $this->getItem() ? 'edit' : 'add';
        $result = $this->execute($action, $context);

        return $result;
    }
protected function _actionPost ( AnCommandContext $ context ) { $ action = $ this -> getItem ( ) ? 'edit' : 'add' ; $ result = $ this -> execute ( $ action , $ context ) ; return $ result ; }
Generic POST action for a medium. If an entity exists then execute edit
else execute add.

@param AnCommandContext $context Context parameter
Generic POST action for a medium . If an entity exists then execute edit else execute add .