What are Components in Yii 2 ?

Member

sidney

by sidney , in category: Technology , 2 months ago

What are Components in Yii 2 ?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by melvina , 2 months ago

Components are an independent set of code written to perform specific task in controllers.Yii applications are built upon components which are objects written to a specification. A component is an instance of CComponent or its derived class. Using a component mainly involves accessing its properties and raising/handling its events. The base class CComponent specifies how to define properties and events.