Project Management Application - Some Guidance Needed

Good Day Yii Community,

First thing, I hope this is not the wrong category, but I didn’t find any “general help” or similar category.

I’m trying to make an application that manages project and team constellations.

I managed to set up the basic functionality, meaning CRUD for all used entities.

There’s a eer diagram attached of how I setup the database.

This is how the program should work:

A user can create environments, which is basically a pool of users available for distribution into projects. I don’t want every user to have all users available, later other users can be added to an evironmentusercollection to choose from.

The structure behind this is also intended for the lower tiers project and teams. So for a project there can be an own userpool, since not all users of an environment need to participate in a project.

Next thing I want to accomplish is showing only environments and projects which the logged in user is part of. So I think there needs to be some kind of filtering when showing all environments using the information given in the environmentusercollection. I don’t know how to proceed further to accomplish this and I’m unable to transfer the information given in the yii documentation onto my problem.

Also when displaying environments, I want to have shown the owners name instead of his id. Since I want the right user associated with the entity, I wouldn’t want to change it in the model. I thought therefore changes must be made to the view. But in my view there’s only the rendering of the model. So again I’m trapped here as to where exactly the changes need to be done.

I would appreciate any help and I’m happy to provide any code needed for you. I’m kind of stuck and don’t know how to proceed furter.

Thank you

To give you a pointer:

Goto the actionIndex() method of the controller

Create a new SqlDataProvider

See: data-providers.md (at the docs in github)

you need to use standard SQL joins etc. to return whatever you want.

Then change the dataProvider to the one you just made.

Which you can now access in your view via GridView::widget()

See: data-grid.md (at the docs in github)