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

How to use the client/view files? #5

Closed
zhang-hang opened this issue Dec 4, 2015 · 7 comments
Closed

How to use the client/view files? #5

zhang-hang opened this issue Dec 4, 2015 · 7 comments

Comments

@zhang-hang
Copy link

hello Borodulin,

I configured main-local.php, but shows only a blank page.

http://localhost/oauth

if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = 'yii\debug\Module';

$config['bootstrap'][] = 'gii';
$config['modules']['gii']['class'] = 'yii\gii\Module';
//Add this into backend/config/main-local.php
$config['modules']['gii']['generators'] = [
    'kartikgii-crud' => ['class' => 'warrence\kartikgii\crud\Generator'],
];

$config['modules']['oauth'] = 'conquer\oauth2\Module';

}

Please tell me how to use it, thank you ...

@borodulin
Copy link
Owner

Hi zhang-hang!
These CRUD were generated by the conquer/gii-modal.
I recommend you not to use these CRUD, and generate your own for the conquer\oauth2\models\Client model. So, you will be able to customize access and views for your needs.

@borodulin
Copy link
Owner

But if you still want to use these CRUD, include conquer/gii-modal in you composer.json.

@zhang-hang
Copy link
Author

Thanks for your reply,

I just quickly install yii2-oauth2-server functionality. do not want to use CRUD.

Because, see the directory has oauth2 / views / client / _form.php, create.php, index.php, view.php, update.php files. I was lazy and would like to be able to use it directly.

Ha ~ :-)

@zhang-hang zhang-hang changed the title How to use the client / create / view / update? How to use the client/view files? Dec 4, 2015
@zhang-hang
Copy link
Author

\vendor\conquer\oauth2\views\client\index.php

conquer\gii\GiiAsset::register($this);

What does this mean? Must be used in gii in it?

@borodulin
Copy link
Owner

These assets makes the Modal dialogs functionality. You should add "conquer/gii-modal": "*" in your composer.json, then run php composer.phar update.
When you click on view or edit button link in the GridView actions column, modal dialog will be opened.

@zhang-hang
Copy link
Author

OK, I have installed "conquer / gii-module", but still can not access \vendor\conquer\oauth2\views\client\index.php , Only one empty page ... 🎱

@borodulin
Copy link
Owner

I see. There is not implemented layout...
So, just generate CRUD for the conquer\oauth2\models\Client in your application, it's a simple operation and your lazyness will not suffer. I will remove these controllers and views, to not confuse developers. There is no need to include such functionality in the extension, because views and user access depends of the business logic of the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants