Skip to content

Commit

Permalink
Merge pull request #202 from cebe/docs-fixes
Browse files Browse the repository at this point in the history
Fixed namespaces in documentation about providers
  • Loading branch information
schmunk42 committed May 22, 2017
2 parents b5aac96 + 1cbda53 commit b20f277
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
19 changes: 9 additions & 10 deletions docs/30-using-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ Examples for this use-case are editors, file-uploads or choosers, complex input
data via AJAX and so on.

With Giiant Providers you can create a queue of instances which may provide custom code depending on more complex
rules. Take a look at some existing [giiant providers](https://github.com/schmunk42/yii2-giiant/tree/master/crud/providers).
rules. Take a look at some existing [giiant providers](https://github.com/schmunk42/yii2-giiant/tree/master/src/generators/crud/providers).

Configure providers, add this to your provider list in the form or command configuration:
To configure providers, add this to your provider list in the form or command configuration:

\schmunk42\giiant\generators\crud\providers\EditorProvider,
\schmunk42\giiant\generators\crud\providers\SelectProvider,
\schmunk42\giiant\generators\crud\providers\OptsProvider,
\schmunk42\giiant\generators\crud\providers\extensions\EditorProvider,
\schmunk42\giiant\generators\crud\providers\core\OptsProvider,


And configure the settings of the provider, add setting via dependecy injection this to your application config, eg. in `console/config/bootstrap.php`:
And to configure the settings of the provider, add settings via dependecy injection to your application config, e.g. in `console/config/bootstrap.php`:

\Yii::$container->set(
'schmunk42\giiant\generators\crud\providers\EditorProvider',
\schmunk42\giiant\generators\crud\providers\extensions\EditorProvider::class,
[
'columnNames' => ['description']
]
Expand All @@ -41,7 +40,7 @@ And configure the settings of the provider, add setting via dependecy injection
This will render a Ckeditor widget for every column named `description`.

<?= $form->field($model, 'description')->widget(
\dosamigos\ckeditor\CKEditor::className(),
\dosamigos\ckeditor\CKEditor::class,
[
'options' => ['rows' => 6],
'preset' => 'basic'
Expand Down Expand Up @@ -87,7 +86,7 @@ Finally add the configuration via DI container

```
\Yii::$container->set(
'schmunk42\giiant\generators\crud\providers\CallbackProvider',
\schmunk42\giiant\generators\crud\providers\core\CallbackProvider::class,
[
'activeFields' => $activeFields,
'columnFormats' => $columnFormats,
Expand All @@ -107,7 +106,7 @@ Finally add the configuration via DI container
Use a DateTimePicker for the `scheduled_at` field:

```php
\Yii::$container->set('schmunk42\giiant\generators\crud\providers\DateTimeProvider', [
\Yii::$container->set('schmunk42\giiant\generators\crud\providers\extensions\DateTimeProvider', [
'columnNames' => ['scheduled_at'],
]);
```
Expand Down
2 changes: 1 addition & 1 deletion docs/31-callback-provider-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ use schmunk42\giiant\generators\crud\callbacks\yii\Db;
use schmunk42\giiant\generators\crud\callbacks\yii\Html;
\Yii::$container->set(
'schmunk42\giiant\generators\crud\providers\CallbackProvider',
'schmunk42\giiant\generators\crud\providers\core\CallbackProvider',
[
'columnFormats' => [
// hide system fields, but not ID in table
Expand Down
2 changes: 1 addition & 1 deletion docs/60-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Command line example for Windows
```
yii giiant-batch ^
--modelNamespace=app\models ^
--crudProviders=schmunk42\giiant\generators\crud\\providers\optsProvider ^
--crudProviders=schmunk42\giiant\generators\crud\providers\core\OptsProvider ^
--tables=account,article
```

Expand Down
2 changes: 1 addition & 1 deletion docs/example-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
};

\Yii::$container->set(
'schmunk42\giiant\generators\crud\providers\CallbackProvider',
\schmunk42\giiant\generators\crud\providers\core\CallbackProvider::class,
[
'columnFormats' => [
// hide system fields, but not ID in table
Expand Down

0 comments on commit b20f277

Please sign in to comment.