Cstarrating is mainly used for scoring, showing a group of stars (5) for scoring.
Basic usage is as follows
Beginwidget (' Cactiveform ');? >widget (' Cstarrating ', Array (' model ' = = $model, ' attribute ' = ' rating ', ' name ' = > ' rating ', ' value ' =>3,));? >endwidget ();?>
The value of the star can be accessed by $_post[' rating ' in the controller, for example:
Public Function Actionindex () {$model =new datamodel (); $model->rating=3;if (!emptyempty ($_post[' rating '])) {$ mode
and layout in the Yii Framework similar to Java Swing allow nesting, which is achieved through ccontentdecorator, but does not require direct use of ccontentdecorator in code, but rather in defining layout using
$this->begincontent (' Path/to/view '),//... content to be decorated$this->endcontent ();
Where view is a different layout.
This example defines four layout, one nested one:
main.php
The results appear as follows:
These are the contents of the Yii Framework
PHP development framework YiiFramework tutorial (16) UI component StarRating example
CStarRating is mainly used for scoring. a group of stars (five stars) are displayed for scoring.
The basic usage is as follows:
BeginWidget ('cactiveform');?>
Widget ('cstarrating', array ('Model' => $ model,'Attribute' => 'rating ','Name' => 'rating ','Value' => 3,);?>
EndWidget ();?>
In th
PHP development framework YiiFramework tutorial (12) UI component ClipWidget example
The CClipWidget provides a function similar to the recording "macro". the content defined between the init and run of the CClipWidget can be stored in the Clip variable of the Controller, and then played back to any other location.
CClipWidget encapsulates the beginClip and endClip of CBaseController. The basic usage of beg
(radiantstaticmeshwebviewactor)After clicking on the simulate , the simulation results are as follows:Drag into the game scene, position it, and then run:Eighth Step:Let's be free to explore something in this blueprint :First look at this component and see the details:where refresh rate is the update frequency (if the value is 1, the video in the screen, the page effect will be one second frame). URL: Web page. Size: The dimensions of the Web page (resolution, etc.). Mouse Effects:Set the size
example adds CAPTCHA functionality to the Starrating sample of the Yii Framework Development Tutorial (a) UI component, which is valid only if the input verification code is correct and avoids automatic scoring by the machine.
The first is to modify the Datamodel, add a property Verifycode the authentication code that holds the user input, and add ccaptchavalidator validation to it.
Class
Datamodel ex
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.