[], 'join_with' => [], 'orderby' => '', 'attribute_id_producer' => 'user_producer.id_producer' ]; } public function findOneUserProducer(User $user, Producer $producer) { return UserProducer::searchOne([ 'id_user' => $user->id, 'id_producer' => $producer->id ]); } public function findUserProducersByUser(User $user, bool $active = true, bool $bookmark = true) { return UserProducer::find() ->with(['producer']) ->where([ 'id_user' => $user->id, 'active' => $active, 'bookmark' => $bookmark ]) ->all(); } }