Yii is a high-performance, component-based, open source PHP framework best for developing Web 2.0 applications. It is one of only few PHP frameworks that supports EDP (Event-Driven Programming) and this tag contains questions that are specific to events in Yii.
Questions tagged [yii-events]
89 questions
1
vote
2 answers
How to generate a Yii Report
I'm new at Yii, and I'm trying to generate some reports with some user input (fill the form and then click 'generate'). I want to query my database to look for some transactions on a date range, but I really don't know how to do it.
Does anyone…

jdiegod
- 31
- 2
- 5
0
votes
1 answer
How to know if the triggered events succeed or fail in Yii2
I trigger an event in Yii2 transaction, and I want to know if the event handler succeed to commit the transaction, or fail to rollback.
Is a global variable or class const the right way?
What I do now is throwing an error in the event handlers.

feistiny
- 95
- 6
0
votes
1 answer
Yii framework folder structure
Hi i have made a web application by using yii framewrok. Currently its perfectly working, but as i went through yii forums i realized my folder structure is not the perfect one as described. I want to make it a proper yii framework supported web…

Prog_Rookie
- 438
- 7
- 23
0
votes
4 answers
get data from db using an array in yii
Im new to yii. my problem is, I have an array $hometeamid which contains all the id that i need to display details. How can i get the data. plz somebody help me
I have tried $mod = Yii::app()->db->createCommand('SELECT * FROM event WHERE id =…

Salini L
- 829
- 5
- 15
- 43
0
votes
1 answer
Yii trigger component event from controller action
I'm trying to create a method where I can trigger an event from a controller action (sending parameters with it), and have multiple components (in the same, or in another module) to listen that trigger and execute some random code (maybe some…

MGP
- 653
- 1
- 14
- 33
0
votes
1 answer
$_POST[] Value disappears in admin- but works in view-module
I have a problem here which i am working quite a while but do not have any ideas left for a solution. I will try to make it short:
I use the eColumns extension for the admin and the view module in yii. I added a combobox to select views which are…

calimero
- 35
- 4
0
votes
1 answer
Yii afterfind is not firing
I am not sure why my yii afterFind method is not firing. Below is what i used to test the yii afterfind method. For every find, the first_name should be "hahahahahaa". This is just to test that the afterfind is working
Below is my model class of…

madi
- 5,612
- 5
- 36
- 48
0
votes
0 answers
Yii update row fails to update 2 variables at the same time
We need to update 2 parameters in one row from DB: actInTime and the stat.
Based on the current time the status can be 'Working(L)' or 'Working'.
stat is DB is defined as an ENUM with 'Working(L)' and 'Working' as the values.
$shiftData =…

user2050274
- 41
- 1
- 2
- 4
0
votes
1 answer
AJAX validation in search
I am new to Yii, I have two tables. master_customer,master_client. In the client model, in the view I have a search box, If I enter a few letters in the search box, it must automatically get the data and give results from master_customers(like…

user3107044
- 21
- 2
- 10
0
votes
2 answers
Create CDBcriteria in yii
How to create cdbcriteria fo the query like :
select * from table_name where 'profile_type'='*'OR 'profile_type'=$usertype AND 'location'='*'OR 'location'=$country

Gaurav Parashar
- 126
- 11
0
votes
2 answers
Yii how to invoke an event handler on each request
Is it possible in Yii to invoke an event handler so that it executes on each controller action call.
Basically I have a RESTful application. On each request, currently, it explicitly calls an authentication function. What I want is the…

Shahid Karimi
- 4,096
- 17
- 62
- 104
0
votes
1 answer
Not Updating The Image Doesn't Update The Record
The problem is if I want to update the other fields and not the image. It passes the validation and doesn't update any of the fields.
But if I update the image and other fields it updates. Or if i update the image it updates.
View:

Tested
- 761
- 4
- 16
- 38
0
votes
0 answers
Missing argument 1 for CUserIdentity::__construct()
I just want to save data in stat table but it show me error:
Missing argument 1 for CUserIdentity::__construct(), called in C:\xamp\htdocs\balteen\protected\controllers\RegisterController.php on line 60 and defined
My code:
$stats = new Stat(); …

user2982973
- 1
- 1
0
votes
3 answers
CFileLogRoute error
i want to create new log file for with my custom error or custom messages but i am not able to do that. even i have made the changes in main.php file as well.
array(
'class'=>'CFileLogRoute',
…

Anil Kumar
- 701
- 11
- 28
0
votes
5 answers
Yii multiple file upload
hi i am doing multiple file upload in yii...
i have setup form to use multiple file upload like this...
myfrom.php
beginWidget('CActiveForm', array(
'id'=>'topic-form',
'enableAjaxValidation'=>false,
'htmlOptions' =>…

404 Not Found
- 1,223
- 2
- 22
- 31