Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Várias mudanças #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
legba-gii - About
#### legba-gii - About

An extension of gii generator that brings several improvements.

In all views, the button panel is more complete, including print button on all screens, list all and filter (for togglet form filters) and form better sized filters.
Expand All @@ -9,7 +10,8 @@ In the controls, the delete of methods were treated for exeções and not genera

In the models for each relationship are created beyond getRelName () the getAllRelName () that behind all the list of entities that can be related to it (collection of active objects record of the relationship type). To facilitate the construction of views, is created getAllDataListRelName () that generates a list of the type key => value utility to popular forms, and is used to generate the improvements of relaciomaneto in views already described above.

legba-gii - Install
#### legba-gii - Install

First clone (or fork / clone) git repository to your workplace, or if you prefer, download one of our releases in https://github.com/id5/legba-gii/releases

The location where the files should be (clone or download previous step) of legba-gii should be @ app / vendors / legba-gii
Expand Down
5 changes: 3 additions & 2 deletions model/advanced/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public function get<?= $name ?>()
*/
public function getAllDataList<?= $name ?>()
{
if ( empty($relModel = <?= $relation[1] ?>::find()->asArray()->all() ) ) {
$relModel = <?= $relation[1] ?>::find()->asArray()->all()
if ( empty( $relModel ) ) {
$arrTemp= array('', '');
}else{
foreach($relModel[0] as $key => $value){ $arrTemp[] = $key; }
Expand Down Expand Up @@ -143,4 +144,4 @@ public function loadAndSave( $arrData )
return false;
}

}
}