This is an extension to Yii 2.0: Write & use a custom Component in Yii2.0 for Advanced Template
This is an extension to Yii 2.0: Write & use a custom Component in Yii2.0 for Advanced Template
In yii2 we can create form without create FormModel. Here we go
View file
Authentication and Authorization is a good tutorial. Among other topics, it describes basic aspects of Yii's RBAC implementation. But however hard I read the tutorial, I couldn't understand how exactly the hierarchy works. I found how to define authorization hierarchy, how business rules are evaluated, how to configure a...
Yii have a CJuiProgressBar, but it is static. If we want a dynamic progress bar to show the percentage or status, we have to do more things. I make it successfully and am glad to share it with you.
Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components
and modify your
params.php
` file like this:
This article will explain how to create a REST API with the Yii framework.
this is my way for embed js code block in view file:
Stores session data in database and transfer data when session is destroy. Uses for check users online, user's last activity and last ip.
A time ago i've met the issue that Yii doesn't run any client-side form validation when submitting the form by CHtml::ajaxSubmitButton. The small javascript below helps to fix it.
The basic idea is to render a grid and, for each row, render a set of radio buttons that asynchronously update their respective model.
In this wiki I will show how could be store last login date & time in database. First we need a field LastLoginTime (Type must be datetime). this field store a user login detalis (like - Date & Time).
Translation from .txt file Note:
In this wiki I will show how to create own custom global function. It may be save the space and reduce the time.
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way **you can write columns grouping h...
When talking about cookie-base login the Yii guide indicates the following:
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?
create a class file under protected\components named RActiveRecord.php
Implementing a role based access control is a very easy process and you can even load your roles from the database if you want.
login links will be