The example of this article describes the method of defining the address of the operation button in the Yii view CGridView. Share it with everyone for your reference, the details are as follows:
<?php $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'mem-sub-grid', 'dataProvider'=>$model, 'columns'=>array( 'zpc_catname', array('name'=>'inputtime', 'value'=>'date("y-m-d H:m",$data->inputtime)', 'htmlOptions'=>array('class'=>'t_c'), ), array( 'class'=>'CButtonColumn', //注意URL规则 'updateButtonUrl'=>'Yii::app()->controller->createUrl("updaterole",array("id"=>$data->primaryKey))', 'deleteConfirmation'=>'确认删除',//删除操作弹框提示的信息 'buttons'=>array( 'view'=>array('visible'=>'false'), //注意URL规则, 'dalete'=>array('url'=>'Yii::app()->controller->createUrl("deleterole",array("id"=>$data->primaryKey))') ), ), ), )); ?>
I hope this article will be helpful to everyone’s PHP program design based on the Yii framework.
For more Yii view CGridView implementation operation button definition address examples and related articles, please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Chinese version
Chinese version, very easy to use

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
