开发者

Error handling custom component Joomla

How to set and retrieve error inside component in model I have:

  if (empty开发者_JAVA百科($coupon->coupon_id))
    {
        $this->setError( JText::_( "Invalid Coupon" ) );
        return false;
    }

How to retrieve this error inside controller? this->getError gives nothing :(

Thanks


Do you want to return the error to the screen?

If so, http://docs.joomla.org/Display_error_messages_and_notices


In your controller you need to invoke your model and use the $model->getError(); function instead of $this->getError();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜