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
3
votes
2 answers

How Do I disable the "gii" code generator for non admin user?

I am using Yii 1.13 framework for my project, I need "gii" code generator but I want to restrict it for admin user only, How can I achieve this ?
Ganesh Ghalame
  • 6,367
  • 3
  • 24
  • 29
3
votes
1 answer

Yii Framework Unknown Property Exception

I know this might seem trivial but I really can't figure it out. I'm starting to develop a database application using Yii Framework and MySQL. I tried following the simple basic tutorial :…
user3640056
  • 732
  • 4
  • 13
  • 28
3
votes
3 answers

Getting error Invalid Call – yii\base\InvalidCallException when customizing urlManager component in Yii 2

I have set up the Yii 2 basic app and under config/web.php I use: urlManager' => [ 'class' => 'yii\web\UrlManager', 'enablePrettyUrl' => true, 'showScriptName' => false, ] under components. But when I…
ishtiaq ahmed
  • 485
  • 5
  • 9
3
votes
3 answers

Dynamic Multilevel Drop-down menu in Yii2

I want to create a dynamic menu with my table (db). I have followed some instructions which are given below: Table : "menupanal" Step 01: I just create a super controller in app\components\Controller.php Here is the code: namespace…
user3265065
3
votes
5 answers

Yii2 Custom url management. Getting 400 error

Well, PHP times. My client wants me to use Yii2 as the framework for his project. I got it up and running. No problem. I used the advanced template via composer. Set my web root to /frontend/web, etc. NOW, i want to use this url…
Pepito Fernandez
  • 2,352
  • 6
  • 32
  • 47
3
votes
1 answer

In Yii What is the difference between the $model define with and without function

In Yii What is the difference between the $model = new Users and $model = new Users() ?
saravankg
  • 909
  • 1
  • 10
  • 21
3
votes
3 answers

seo friendly urls in YII framework with id and name

I've been searching all around Stackoverflow and YII forums, there are many answers, which didn't help me... This is my case. I have controller called: proj and an action called view. It gets: id(int), name(string). The desired name gets sometimes…
Michael Kisilenko
  • 491
  • 2
  • 6
  • 15
3
votes
1 answer

Yii $this->renderPartial() in widget Action throw error

I'm new to Yii and try to write a widget. It is a complex one and include an "Actions", that should render a View inside this widget. I used to $this->renderPartial(); inside the Action, but it throw error. My widget class shortened constuction…
Viktor P
  • 43
  • 1
  • 6
3
votes
1 answer

yii - how to create a completely independant extension using nusoap 0.9.5 in yii 1.1.13

SOLVED Thanks to @JPR and tuned-up thanks to @PeterM /* The only dependance is when */ class NuSoap extends CApplicationComponent v-Below, the initial question -v I would like to know how to create a basic extenstion in yii 1.1.13 using nusoap…
Truefalse
  • 794
  • 5
  • 16
3
votes
1 answer

How to properly use and store images in Yii

I think someone has already asked the question about where the best or how to store images that are used in the code and CSS. I personally keep it all in the folder: /protetsted /components/assets/images/ Use the code as follows: $loadingImage =…
frops
  • 2,196
  • 4
  • 29
  • 42
3
votes
1 answer

How filter my user list by status ? - Yii

I use Yii Framework and I want to filter by status my users list. The status is defined by a number: 0 : enabled 1 : banned 2 : disabled Therefore display the correct status I use a function itemAlias​() : public static function…
Florent
  • 761
  • 1
  • 10
  • 24
3
votes
3 answers

Yii: attaching events to models

I have a User model which is bundled in a module installed on my Yii application. This module is third party and I do not want to alter its code. I also have a Cv Model that has a BELONGS_TO relation with the User model. My question is: How can I…
antoniom
  • 3,143
  • 1
  • 37
  • 53
3
votes
2 answers

yii CGridView filter with relations

I'm using yii for my web application. In one of my view I have CGridView and dataprovider is Mail model. In this model I have relation with with 3 other models. In the grid I show cols from three models. How can I filter the CGridView? UPDATE:
nyanev
  • 11,299
  • 6
  • 47
  • 76
3
votes
3 answers

YII compress your application output using gzip

what is the benefit of below code that is two events. what its actually doing ?? require_once($yii); $app = Yii::createWebApplication($config); Yii::app()->onBeginRequest = function($event) { return…
Edward Maya
  • 429
  • 2
  • 10
  • 25
3
votes
1 answer

afterAjaxUpdate callbackfunction CListView shows undefined

i am trying to call a function which is defined in another js file by afterAjaxUpdate paramter of the file name but i got error in console that function is not defined
Bipin Chandra Tripathi
  • 2,550
  • 4
  • 28
  • 45