Questions tagged [yii-components]

Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as "Yee" or [ji:] and it's an acronym for "Yes It Is!"

For more information on Yii components, please see the Yii documentation at:

http://www.yiiframework.com/doc/guide/1.1/en/basics.component

434 questions
1
vote
0 answers

Yii CGridView column values are not able to access by $data->time. getting error Trying to get property of non-object

$this->widget('zii.widgets.grid.CGridView', array( 'id'=>'mobile_no', 'dataProvider' => $model, 'columns' => array( array( 'header' => 'Name', 'name' => 'emp_name', ), …
1
vote
2 answers

Disable save() in the model based on an if statement (Yii 1.x.x)

I am running some code in my Model, which does the following: public function beforeSave() { $this->parent_exists = FALSE; // search for existing parent.. $existing_parent = Myparents::model()->findByAttributes(array('email' => $this->email));…
Zabs
  • 13,852
  • 45
  • 173
  • 297
1
vote
0 answers

How to extends CBehavior when using massLogout

I have made a file applicationBehavior.php which are in the component folder, like this : 'massLogout', …
Bertho Joris
  • 1,483
  • 5
  • 27
  • 60
1
vote
2 answers

How to install Yii extension when 'log'>'routes' is an associative array?

I ran into this while trying to install several Yii extensions. E.g. http://www.yiiframework.com/extension/yii-debug-toolbar/ or http://www.yiiframework.com/extension/yiidebugtb/ Instructions say to get this in the components part of…
Nelu
  • 16,644
  • 10
  • 80
  • 88
1
vote
1 answer

What is wrong with the statement,in Yii?

I have a folowing code in my controller , public function actionViewJob() { $user_id = Yii::app()->session['user_id']; /* For User Authentication */ if (Yii::app()->user->getId() === null) …
saji
  • 201
  • 1
  • 5
  • 19
1
vote
1 answer

How to get widget data in POST method of form submission?

I have widget called List builder, which i used to sort list of contacts. when i submit the form the, i should get these sorted list of contacts in my $_POST array. I am getting the content from CGridview widget but not from the following…
satya
  • 31
  • 7
1
vote
1 answer

build a new function as afterSave() Yii

I am building a shoping cart in Yii. Now I want to buid a function with name is afterCharged() the same as afterSave(). So how to can do it? Thank you in advance
Hoang NK
  • 540
  • 2
  • 8
  • 18
1
vote
0 answers

How RaiseEvent Event Functions Just In One Place in Yii Framework CComponent

as You know for making System Event Based You Should create Event Functions for Each of them so this is sample: in Controller which Extended CComponents i create function: public function onDashboardInit($event) { …
1
vote
2 answers

Trim function not working Yii

I have a form in Yii. Here if I enter preexist values, it gives me an error. That is working fine, But if I add some spaces in front of the field, it does not gives me an error, nor save the data, but display the data as if it is saved. when I…
user3318138
  • 119
  • 1
  • 2
  • 18
1
vote
1 answer

How to disable Yii Resque log

I'm working with Yii-resque extension. I need to disable Yii-resque log. How can I do it ?.
FixBug
  • 355
  • 2
  • 17
1
vote
1 answer

Update multiple widgets by using TbExtendedGridView ajax filtering

I have view with 3 widgets. Two TbButton widgets and one TbExtendedGridView widget. Buttons are used for "insert new user" and "create pdf". TbExtendedGridView is used to list current users and their attributes. TbExtendedGridView has filtering…
Ljudotina
  • 269
  • 1
  • 3
  • 14
1
vote
1 answer

Secured URL format in Yii Application to display

I think this is not new thing but yet to be discussed. I have been trying to get the best way to change the display URL format of Yii application. Simply to show the content, we need to pass the content id to the controller. If the content is…
Prasath
  • 106
  • 12
1
vote
2 answers

Change the url and reload on change of dropdown value which is in common header

I am new to yii and I want to change url and reload the current view page on change of a dropdown value which is in the admin's common header field. Dropdown is echo $form->dropDownList($siteid, 'selectedsiteid', $data,$htmlOptions, array('class'…
Salini L
  • 829
  • 5
  • 15
  • 43
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