You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now both the `ClientsTable` and `AdministratorsTable` will share `users` db table. A table has to have a `discriminator` field which will be used to determine which model's record is stored in a row.
@@ -76,6 +76,12 @@ public function initialize(array $config)
76
76
77
77
An `ImagesTable` will share `files` db table and match only specified mime types.
78
78
79
+
You can also add accepted discriminators on runtime:
80
+
81
+
```php
82
+
$table->addAcceptedDiscriminator('image/bmp');
83
+
```
84
+
79
85
### Configuration ###
80
86
81
87
`StiBehavior` supports following options:
@@ -84,7 +90,7 @@ An `ImagesTable` will share `files` db table and match only specified mime types
84
90
*`discriminator` - default discriminator value, `$table->alias()` by default
85
91
*`table` - db table to share, use this option or `$table->table()` method.
86
92
*`checkRules` - `true` by default. Allows to enable/disable build-in rule check for a discriminator value.
87
-
*`allowedDiscriminators` - a list of allowed discriminators.
93
+
*`acceptedDiscriminators` - a list of accepted discriminators.
0 commit comments