Questions tagged [gii]

Gii is the web-based code generation tool of Yii Framework. While you can add your own code templates to Gii, it is equipped with templates for Controllers, CRUDs, Forms, Models and Modules.

Starting from version 1.1.2, Yii is equipped with a Web-based code generation tool called Gii. It supersedes the previous yiic shell generation tool, which runs on command line.

Detailed instructions about Gii can be found here: http://www.yiiframework.com/doc/guide/1.1/en/topics.gii

163 questions
1
vote
1 answer

gii installation on Yii CMS

Can I add Gii( Yii extension) in Craft, which is a Yii CMS? If it can be added as extension, can you please give steps? I have tried following given steps which were for Gii installation on Yii framework as below- 1) Extract the directories…
1
vote
1 answer

Gii CRUD generator and related tables

I am using Yii framework and I have got a problem with CRUD generator. I have got two tables called Users and news with the following structures: CREATE TABLE IF NOT EXISTS `news` ( `id` int(11) NOT NULL AUTO_INCREMENT, `keyword` varchar(1000)…
Hamid Ghorashi
  • 1,003
  • 3
  • 14
  • 29
1
vote
0 answers

YII-1.1.13, GII login not working

I'm unable to login in Yii Gii module. I'm setting right password in config/main.php. 'modules'=>array( 'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>'SOME_PASSWORD', 'ipFilters' => array('127.0.0.1',…
kmithi1
  • 1,737
  • 2
  • 15
  • 18
1
vote
1 answer

Using Many to Many relations in yii

I am currently trying to display/retrieve data from my database using Yii framework relations which were auto generated by Gii. (MANY_MANY) User Model contains: return array( 'memberOfTeams' => array(self::MANY_MANY, 'UsersTeam',…
user2205196
  • 113
  • 1
  • 2
  • 10
1
vote
1 answer

Yii - Can gii be used to create CRUD for a Model that joins tables through relations?

I'm planning on creating a model that joins some tables to be used in a CGridView. Will the CRUD generated by gii work on this? Specifically the ability to Create/Update. I've already tried generating CRUD on a MYSQL view - which did not work…
davepmiller
  • 2,620
  • 3
  • 33
  • 61
1
vote
2 answers

I can't get Yii crud to work

I'm struggling to get the Yii crud tool to work for me. I'm using Gii and this is the error I'm getting in my log file: PHP Fatal error: Cannot redeclare class CController in /var/www/includes/framework/web/CController.php on line 77 These are the…
Mr Goobri
  • 1,449
  • 5
  • 19
  • 42
1
vote
2 answers

Gii module generator doesn't generate some files

I expect Gii module generator generate for 'admin' as…
user1991553
1
vote
1 answer

Yii / Gii Model Code generation add method to generator

I have had a look around the web and can't find a good explanation. Using Gii I generate models. I was wondering how I can get the generator to also add a custom method to all of my models I generate? I want to add a method where I pass it the…
Adam
  • 675
  • 5
  • 25
1
vote
1 answer

Adding where close on Gii generated CRUD

I am beginner with Yii and I used GII to create a CURD table. Everything is working fine but I only want to fetch certain record from the database by putting a where clause (for example "where client gender is male). I cannot find where the data is…
Sahil
  • 1,959
  • 6
  • 24
  • 44
1
vote
2 answers

Yii Gii with MongoDB

Could anyone please tell me how MongoDB can be used with YII? How can we create controller and model functions using Gii if the database used is MongoDB?
user1708645
  • 21
  • 1
  • 5
1
vote
1 answer

Yii - how to deal with extending CFormModel and CFormModel

Let's say i have a database table called 'people'. 70% of the fields in this table are created by the user submitting a form, the other 30% are fields populated from other data. To describe this table I used Gii to create a model (People.php)…
rix
  • 10,104
  • 14
  • 65
  • 92
0
votes
1 answer

How to handle the subpage concept under Yii?

This is a very newbie question so bear with me. I'm starting to use Yii as my first PHP framework and so far so good, the project on wich I'm learning is a simple informative webpage, but how am I supposed to handle the subpage concept under Yii?…
acampos
  • 37
  • 6
0
votes
0 answers

Yii2 generate CRUD with MSSQL

I want to know how we can generate CRUD operations of MSSQL with Gii. I have already added the MSSQL credentials in my config section. But when I try to generate it via Gii I cant see any tables of MSSQL. Any help would be highly appreciated.
Moeez
  • 494
  • 9
  • 55
  • 147
0
votes
0 answers

Error 404 using gii to create a CRUD in Yii2

I am starting with Yii2, already installed XAMPP, created a basic project named 'reservas' with the help of Yii2 project template. Then access Gii by this URL http://localhost/yiidemo/web/index.php?r=gii to generate a sample CRUD with de model…
0
votes
1 answer

I cannot access the Gii function of the Yii2 framework

I have a problem with the gii function in my project. Error: The file or directory to be published does not exist: C:\xampp\htdocs\basic\vendor\yiisoft\yii2/gii/assets The mistake I think is because the path is wrong.
WorraccCdP
  • 39
  • 6