public function init() { parent::init(); if (!isset($this->modelClass) && !isset($this->collectionName)) { throw new InvalidConfigException('Either "modelClass" or "collectionName" must be set.'); } }