Code Monkey home page Code Monkey logo

Comments (15)

schmunk42 avatar schmunk42 commented on August 18, 2024

Do you have this line in your composer.json file?

"phundament/gii-template-collection": "0.8.*",

And do you have the corresponding folder in ./vendor in your app?

from app.

eliasfire avatar eliasfire commented on August 18, 2024

in my composer.json i have : "name": "phundament/gii-template-collection",
i created the folder ./vendor in my folder ./protected ....but its happend nothing
what do i need in ./vendor?

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

Do you use the same folder structure, like phundament/app or a custom one?
Where does composer install the packages in your app?
You're receiving this error in a model generated with FullModel, right?

from app.

eliasfire avatar eliasfire commented on August 18, 2024

i install gtc...i created my model with FullModel and everything is right, then i created FullCrud...and i recived this error...i dont install phundament/ app in my aplication never...is necesary?

from app.

eliasfire avatar eliasfire commented on August 18, 2024

when i generated my model with giix model....and then a generated my fullcrud with gtc...no have problems...but when i generated my gtc fullmodel...and then i can generated my crudfull i recived that error :S

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

FullCrud can save MANY_MANY related models automatically, there's a section in actionCreate() and actionUpdate() to handle this, but your model has to use the CSaveRelationsBehavior.

Have a look at your model base-classes generated with FullModel, there should be a behaviors() method like:

public function behaviors() {
    return array_merge(
        parent::rules(),
        array(
            'savedRelated' => array(
            'class' => 'vendor.phundament.gii-template-collection.components.CSaveRelationsBehavior'
        )
    )
    );
}

Just adjust the class attribute.

from app.

eliasfire avatar eliasfire commented on August 18, 2024

yes! i reemplaze my function behavoirs and now its working :) thnks!

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

Btw: Have a look at the FullCrud slim Templates.

from app.

eliasfire avatar eliasfire commented on August 18, 2024

where that is? 🌴

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

Last input before the preview button "Code Template".

Bildschirmfoto 2013-02-14 um 00 22 46

Looks like this :)

Bildschirmfoto 2013-02-14 um 00 24 17
Bildschirmfoto 2013-02-14 um 00 24 31

from app.

eliasfire avatar eliasfire commented on August 18, 2024

oh...looks great...but when i tray to generera crud with slim templates i recived:

PHP warning

in_array() expects parameter 2 to be array, null given

C:\xampp\htdocs\planillas\protected\extensions\gtc\fullCrud\templates\slim\admin.php(49)

37 'dataProvider'=>$model->search(),
38 'filter'=>$model,
39 'pager' => array(
40 'class' => 'TbPager',
41 'displayFirstAndLast' => true,
42 ),
43 'columns'=>array(
44
45
46 <?php
47 $count = 0;
48 foreach ($this->tableSchema->columns as $column) {
49 if (in_array($column->name, Yii::app()->getModule('gii')->params['crud.skipGridColumns'])) {
50 continue;
51 }
52
53 if ($count == 7) {
54 echo "\t\t/*\n";
55 }
56
57 if (strtoupper($column->dbType) == 'TEXT') {
58 echo "#";
59 } else {
60 $count++;
61 }
}
i created a simple table Hola (id_hola,desp)

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

should be fixed by schmunk42/gii-template-collection@d5d3ec6 I also tagged 0.8.3, may need a few minutes until it's available via packages.phundament.com

from app.

eliasfire avatar eliasfire commented on August 18, 2024

nice! now its working! now i traying giiplus :) thnks for all!

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

You're welcome.
Would love to hear some feedback about the slim CRUDs.

from app.

eliasfire avatar eliasfire commented on August 18, 2024

they look great! :) good work!!

from app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.