Yii Framework Forum: UserControl Equivalent for yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

UserControl Equivalent for yii Rate Topic: -----

#1 User is offline   Mithun Dhali 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 15-May 10

Posted 15 May 2010 - 11:02 AM

Hi All. I am new to php mvc models, but with some background in asp.net.

In asp.net there is System.Web.UI.UserControl class which represents a part of a page. A UserControl has a view, and controller associated with it. It is a reusable component that can be included in multiple pages. For example, a log in box that can be included in multiple page. It can be in multiple pages, and the pages need not be aware of the log in logic.

The nearest equivalent i found is CPortlet ( http://www.yiiframew...og/portlet.menu ). However it doesnot seem to be documented in "The Definitive Guide to Yii" ( http://www.yiiframework.com/doc/guide/ ).

Is there some other alternative equivalent to it? I want to make reusable 'components' which can be included in multiple pages.

If there some alternate philosophy, it would be great if someone can suggest me a literature to model this.

Thanks and Regards
Mithun Dhali
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 16 May 2010 - 03:35 AM

I think, what you're looking for is a Widget (CPortlet is one of them). See here:

http://www.yiiframew...ics.view#widget
http://www.yiiframew...n.create#widget
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users