zii is a component library provided by the YII framework, including list view ListView, table view GridView, and also includes some JQuery-based UI components, such as AutoComplete, DataPicker, Button, Drag and Drop, etc.
The zii component library of the YII framework includes list view ListView, table view GridView, and also includes some JQuery-based UI components, such as AutoComplete, DataPicker, Button , Drag and Drop, etc. Zii components are mainly defined in the package zii. ,zii.widget.
Note: Since some of the UI components are closely related to the data source (Data Provider), it is necessary to introduce the database interface supported by Yii first.
Zii component-Menu example
Menu uses an Html list to display a multi-level menu. Menu configuration is configured through its attribute item. Each menu item includes three main attributes.
visible Whether it is visible
active Whether the current menu item is selected,
items submenu items .
In addition, it also includes the following attributes:
label: optional, menu name, supports the use of HTML tags.
url: Optional, click on the menu to redirect the URL link
template: Optional, menu template
<?php $this->widget('zii.widgets.CMenu',array( 'items'=>array( array('label'=>'Home', 'url'=>array('/site/index')), array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')), array('label'=>'Contact', 'url'=>array('/site/page', 'view'=>'contact')), array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>false), ), )); ?>
yii Framework Tutorial", "PHP Tutorial"
The above is the detailed content of What is zii in yii?. For more information, please follow other related articles on the PHP Chinese website!