-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
Description
Any idea on how to allow IDE (PHPStorm?) to autocomplete the 2nd arg for options array, the keys?
$this->hasMany('ADmad/SocialAuth.SocialProfiles', [
'foreignKey' => 'user_id',
...
]);These are the possible keys per type:
/**
* @var array<string, string>
*/
protected array $optionKeys = [
'\\' . self::CLASS_TABLE . '::belongsTo' => [
'className',
'foreignKey',
'bindingKey',
'conditions',
'joinType',
'dependent',
'cascadeCallbacks',
'propertyName',
'strategy',
'finder',
],
'\\' . self::CLASS_TABLE . '::hasOne' => [
'className',
'foreignKey',
'bindingKey',
'conditions',
'joinType',
'propertyName',
'strategy',
'finder',
],
'\\' . self::CLASS_TABLE . '::hasMany' => [
'className',
'foreignKey',
'bindingKey',
'conditions',
'sort',
'dependent',
'cascadeCallbacks',
'propertyName',
'strategy',
'saveStrategy',
'finder',
],
'\\' . self::CLASS_TABLE . '::belongToMany' => [
'className',
'joinTable',
'foreignKey',
'bindingKey',
'targetForeignKey',
'conditions',
'sort',
'dependent',
'through',
'cascadeCallbacks',
'propertyName',
'strategy',
'saveStrategy',
'finder',
],
];