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

How to import Yii Controller in Yii widgets

How to import Yii Controller in Yii widgets; My Widget code is: class RecentBlogsWidget extends CWidget { public $showblogs; public function run() { Yii::import("application.components.Controller"); $model =…
Muhammad Shahzad
  • 9,340
  • 21
  • 86
  • 130
0
votes
1 answer

create subdomain in yii for particalur controller

I am looking for answer in yii.I want to create subdomain in yii.I want to do url rewrite like this.This should be applied to only one controller not…
Bhaskar Bhatt
  • 1,399
  • 13
  • 19
0
votes
3 answers

cgridveiw to display fetched data via customized query

I am a newbei in yii, when a person clicks on a category display him all products under that particular category in a gridview view productcategory widget('zii.widgets.grid.CGridView',…
Tested
  • 761
  • 4
  • 16
  • 38
0
votes
0 answers

Yii ::: CGridView ::: dataprovider is not working / class is not passing data

I am trying to pass data from another model to my view page with CGridView and controller. It is showing some error: urlencode() expects parameter 1 to be string, array given I created a function for dataProvider. controller public…
Selim Reza
  • 372
  • 8
  • 20
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
3 answers

How to load Yii modules component?

When I did the steps like described here I just get with config in config/main.php: array( 'tracking' => array( 'components' => array( 'tracking' => array( 'foo' => 'bar' ))))); this…
Jurik
  • 3,244
  • 1
  • 31
  • 52
0
votes
2 answers

Check existence of a relation in a model

I have a parent model ParentModel, and in it I want to check if ChildModel has a relation, say, user or not. I try something like: $relation = "user"; if (isset($this->$relation)){ // dosomething } but the condition is always false even when the…
Aladdin Mhemed
  • 3,817
  • 9
  • 41
  • 56
0
votes
2 answers

Yiiframework Range Slider input

I have a user settings page where users can change the settings of the application. The users can input a number between 0 and 10. See screenshot: http://oi43.tinypic.com/2uerazp.jpg Now I would like to transform the input fields into a range slider…
Shark
  • 216
  • 4
  • 14
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(); …
0
votes
0 answers

Yii Criteria Condition Order By in Query Syntax

I have the code below and i am trying to add 'order' => 'creation_date DESC' or something similar but i cant get the right sintax (i am trying to order the results in DESC order); $criteria = new CDbCriteria; $total =…
Gunnit
  • 1,064
  • 5
  • 22
  • 45
0
votes
0 answers

Display list based on condition in Yii

I am trying to hide a list item in Yii CList view based on a visibility condition. Based on an id that I get from the list , I need to check whether a condition exists and display that item only if that condition is true. I have a request_tbl and…
anu
  • 458
  • 2
  • 13
  • 36
0
votes
2 answers

SiteController cannot find the requested view

I am new to YII framework.I have installed Yii framework and I created one new sample project. by default one sample application is coming. I am trying to add one new page to that site. i have created one new tab in menu. I copied that file to view…
dhamu
  • 11
  • 1
  • 4
0
votes
1 answer

Yiibootstrap error

I've installed the Yii bootstrap extension for a Yii project I am working on. When I try to register the bootstrap files I get an error. This is the code provided: bootstrap->register(); ?> The error I get is as following: I…
Shark
  • 216
  • 4
  • 14
0
votes
1 answer

Url to yii component

I am making this notification service which provides an api. Apis are actually static functions of one class 'Notifications'. One of the api functions is:getNotifications. I need to access this class like this way:…
Aladdin Mhemed
  • 3,817
  • 9
  • 41
  • 56
0
votes
1 answer

yii framework calling controller method from extension php file

I want to call controller method from yii extension in specific condition to trigger partial render basePath . '/controllers/SiteController.php'; $obj = new…
user1770863