What are Components in Yii 2 ?

Member

by sidney , in category: Technology , 3 years ago

What are Components in Yii 2 ?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by melvina , 3 years 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.