what is the correct way to load third-party components into Craft 3 plugin I'm developing?
I tried adding
$this->setComponents([
'authClientCollection' => [
'class' => '\yii\authclient\Collection',
'clients' => [
'twitter' => [
'class' => '\yii\authclient\clients\Twitter'
],
// etc.
],
]
]);`
to plugin's init()
function, as well as parent::setComponents
, but both produced same error:
Unknown component ID: authClientCollection
What am I doing wrong here?