Questions tagged [yii-events]

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.

89 questions
1
vote
2 answers

Dynamic url in header menu bar in yii

I am new to yii. In my project I want to pass a parameter through the Cmenu bar array('label' => 'Category', 'url' => array('site/catagory', 'visible' => !Yii::app()->user->isGuest), and the parameter passing is getting from a droupdown list…
Salini L
  • 829
  • 5
  • 15
  • 43
1
vote
1 answer

Object of class Createproduct could not be converted to string error in yii

I am new to yii and I am working on creating drop down .I faced the error please suggest me.. Here his my drop down code
sonorita
  • 771
  • 2
  • 8
  • 20
1
vote
2 answers

Yii - How to validate a textfield for integers only

The below model extends CFormModel and I need to mention rules to it such that the attributes allow only integers. class SearchForm extends CFormModel { public $min_size; public $max_size; /** * Declares the validation rules. …
user3004356
  • 870
  • 4
  • 16
  • 49
1
vote
1 answer

pass an array to action using ajax YII

Hi i'm really new with YII, please help me to solve a simple problem. I'm trying to pass some values from js to action and then to put them into database. Most of this code i got from tutorial public function actionInsert(){ $post =…
Mark Okhman
  • 105
  • 1
  • 11
1
vote
3 answers

Connect 2 databases in Yii to workwith testdata and real data at the same time

My site is preparing to go live. As updations are developed on my site, I would like to test the updations in real server without affecting the real data. I need 2 databases(the same database with 2 names) to connect my site at the same time. One…
anu
  • 458
  • 2
  • 13
  • 36
1
vote
2 answers

Can we implement On key up filter option in Yii's cGridview?

I am currently trying to implement automatic filtering in Yii cGridview, By default it filters 'onclick', or 'enter' key press, But I need to change that event to "onkeyup"| my code is like this …
Marwan
  • 15
  • 4
1
vote
1 answer

yii runcontroller in other controller actions with params

// In my Controller A class Controller A extends Controller { public function action save() { $array1 = $_POST['array']; $A = $this->redirect(array('controller B/insert','data'=>$array1)); echo $a; } } //…
Vijaykumar
  • 11
  • 1
1
vote
1 answer

Yii - Event not fired because the module class is not loaded

I am trying to register an event from within a module. So, I added this couple of lines in the init function of my module class (protected/modules/points/PointsModule.php). class PointsModule extends CWebModule { public function init() { …
benomite
  • 848
  • 7
  • 23
1
vote
1 answer

How to read Output of Console Command in Yii?

I am trying to build some cron jobs to do backup some critical data on my Yii WebApplication I have built the the CConsoleCommand Class that needs to run. It runs fine and the command is executed However my job requires the application to parse the…
Manquer
  • 7,390
  • 8
  • 42
  • 69
1
vote
2 answers

How to sort the fields from relation table in Yii?

I am trying to implement sorting with Yii list view. I have joined 2 tables named provider_favourite and service_request in list view. And the fields and contents from both tables are listing in the list view. But sorting is working only in…
anu
  • 458
  • 2
  • 13
  • 36
1
vote
3 answers

Hidden Pagination summary text

I use CGridView in Yii to create tables. I would like to show my table with pagination but hide the summary text at the top, which indicates the number of page restance (Displaying 1-4 of 4 results.) Is that possible? thank you Sorry for my English
Florent
  • 761
  • 1
  • 10
  • 24
1
vote
1 answer

Including JS file in View In YII

I want to load the JS file in view to avoid heavy-loading of my application. I am using this JS file for CgrdView in view. SO i tried…
tnchalise
  • 1,573
  • 2
  • 18
  • 38
1
vote
3 answers

Encrypting POST data in YII

How can I encrypt the post method data from VIEW in YII? Also is this is a good way to write such a function? It should encrypt POST data in VIEW that is sent to - and decrypted in - the controller. 'buttons' => array( 'Edit' =>array( …
tnchalise
  • 1,573
  • 2
  • 18
  • 38
1
vote
0 answers

YII displaying flash message when textbox value is updated

I have textbox in CGrid view that is generated from array( 'header' => 'Points', 'type' => 'raw', 'name' => 'points', 'value' => …
1
vote
3 answers

Auto complete fields of a previous values

I am doing a small application in Yii Framework for that my database is something like this === Invoices === id (PK) customer_id invoice_title order_no invoice_issue_date due_date description === Customers === id (PK) …
NewUser
  • 12,713
  • 39
  • 142
  • 236