create a class file under protected\components named RActiveRecord.php
create a class file under protected\components named RActiveRecord.php
The basic idea is to render a grid and, for each row, render a set of radio buttons that asynchronously update their respective model.
Countries sometimes change their laws pertaining to time zones and daylight saving times. This means that GMT+2 can be a different local time this August compared to last August! It could even be a different date!
During development, it's often very handy to have SQL logging and profiling.
When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().
CJuiDatePicker displays a datepicker. CJuiDatePicker encapsulates the JUI datepicker plugin.
$this->render('index', array(
'dataProvider' => $dataProvider,
));
`
In this article you will find Yii framework extensions enabling you to add various charts/print out buttons etc. to your webapp.
If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update
tasks.
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue').
We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a Radio Button List, which has the enum values as options.
This is a rewrite of c@cba in the wiki article of [enumDropdownList](http://www...
I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.
There are some very advanced grids in the Yii2 community, specifically Kartik's amazing gridview extensions but they all designed for interactive screen use.
Normally, after clicking the delete button in gridview, the record will be deleted and the page will refresh, but the page number in query string is lost. This is not always the case we expect.
Usually when we use AutoComplete in a project, We need to show "title" or "name" in the list, while when the form is posted, we need some sort of integer ID referring to the selected value. Out of the Box, CJuiAutoComplete widget doesn't provides different display text and post values.
Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).
MrFisk is a sleek little bot hanging out in the official #yii IRC channel on freenode, meant to serve Yii users with documentation lookups and other things. This document intends to provide a summary of what MrFisk can do for you and how to use his fin^H^Heatures.
After enabling the Gii module in your protected/config/main.php
file and then try to use it with http://example.com/index.php?r=gii
, you get an error:
~~~
Error 403
You are not allowed to access this page.
~~~
This is almost certainly caused by the IP filtering mechanism that Gii uses to protect your system from outsiders - by default it allows localhost
only (both IPv4 and IPv6), and r...
I've seen lot of people struggling in finding a way to hide the script name when installing their Yii Application. In an Apache environment everything is well documented in this wiki article, but for those who are running their app on a Windows Server machine there are no hints.
PHPIDS is a well known project that can be found in php-ids.org.
You have to extend the widget class and configure it for user login widget