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
4
votes
1 answer

CDbConnection and braces

Do a small component for my Yii app. Code $connection = Yii::app()->getComponent('db'); $sql = 'SELECT * FROM {{settings}}'; $command = $connection->createCommand($sql); raises error SQLSTATE[42000]: Syntax error or access violation: 1064 You…
serghei
  • 3,069
  • 2
  • 30
  • 48
4
votes
1 answer

Uploading file in Yii using ajax

I am trying to implement file upload from a popover using ajax like facebook chat . I found that using ajax submit button, it is not able to upload files in Yii. So I tried to use like php method. Here is the php method I found, which is well…
Lakshmi
  • 85
  • 2
  • 7
4
votes
2 answers

T_PAAMAYIM_NEKUDOTAYIM Error after override CButtonColumn

I overrode CButtonColumn class and code worked in perfect way on localhost(windows) , but when I uploaded it to linux server I had this error : Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in…
Ahmad Samilo
  • 914
  • 16
  • 30
4
votes
1 answer

Yii passing parameters to widget

Sorry if I am using wrong keyword. Might be I did not get sufficient information due to wrong keyword. we create widget in Yii by this way: class streamList extends CWidget { //do some stuff } Also, we use this widget anywhere as…
Shahid Karimi
  • 4,096
  • 17
  • 62
  • 104
4
votes
1 answer

Yii validation rules for foreign key

Let's say I have an ActiveRecord with the following validation rules: public function rules() { return array( array('model', 'required'), // .... array('model', 'exist', 'allowEmpty' => false, …
Andrea
  • 3,627
  • 4
  • 24
  • 36
4
votes
2 answers

How to change $model->attributes value in controller - Yii

UserMasterController Code: public function actionUpdate($id){ $model=$this->loadModel($id); if(isset($_POST['UserMaster'])){ $model->attributes=$_POST['UserMaster']; $model->attributes['emailsent'] = 'N'; …
Darshit Gajjar
  • 746
  • 4
  • 13
  • 26
4
votes
1 answer

CListView in Yii Framework

I have started working on yii framework and I am following the yii blog tutorial to learn basics of yii framework in this tutorial they have used a ClistView in posts view but i am getting an exception This is the code that i have used in view…
Code Prank
  • 4,209
  • 5
  • 31
  • 47
3
votes
3 answers

How to find YII routes from url

I am new in Yii Framework. I am doing one small correction in Yii framework web app. Their third party Fax(Fax.de) API providers change something, I am trying to change the code, but I couldn't get the right file. If the URL is…
AK INFOPARK
  • 31
  • 1
  • 3
3
votes
1 answer

Dynamically Change Yii2 configurations

I am trying to dynamically change App name and some components config Using component event: Please refer to the attached image, I have highlighted with red marker which part i want to set in my component. My component code is…
Arunendra
  • 570
  • 2
  • 10
  • 34
3
votes
2 answers

Alias "ext.components.MyClass" is invalid. Make sure it points to an existing PHP file and the file is readable

i am new in yii framework. currently i am using yii 1.1. now i want to create custom components and we can say than create global function which is use anywhere in the application. According to this url…
Hitesh Sharma
  • 95
  • 1
  • 7
3
votes
1 answer

How to install a project from github based on yii

I'm a newbie studying how it works YII. I found this project interesting. Yii2-simple-classified with app-advanced https://github.com/deviardn/diadoo I read the documentation but I do not know exactly what I should do to be able to test it on…
3
votes
1 answer

Is it possible to make Yii2 call a function when executing php init?

I'm wondering if it's possible in Yii2 to call a function automatically when executing php init command? I have a component/extension which has a function that I want to call only when the Yii2 app is initialized. Can this function be registered in…
user3022069
  • 377
  • 1
  • 4
  • 13
3
votes
5 answers

Yii2 authclient not returning email id of user

Am using yii2-authclient for facebook login for my site, Am getting response like this yii\authclient\clients\Facebook Object ( [authUrl] => https://www.facebook.com/dialog/oauth?display=popup [tokenUrl] =>…
user3377747
  • 79
  • 1
  • 9
3
votes
2 answers

kartik GridView Yii2 - How To Configure the Export Configuration For PDFs (Header, Footer, Title)

I'm trying to figure out a way to modify the header for the PDFs when I do the export. Right now the header say something like Yii2 Grid Export (PDF) Grid Export. Here is the code I'm using to try to modify it: 'exportConfig' => [ …
O2U
  • 429
  • 2
  • 8
  • 22
3
votes
1 answer

How to add custom link in Yii 2 validation error message?

I would like to add custom link in Yii 2 model based validation message. I am using following code block at the moment- public function rules() { return [ ['email', 'required'], ['email', 'email'], ['email', 'unique', 'targetClass' =>…
The Coder
  • 618
  • 3
  • 10
  • 22
1 2
3
28 29