yii\db\ActiveQuery::innerJoinWith PHP Method

innerJoinWith() public method

This is a shortcut method to ActiveQuery::joinWith with the join type set as "INNER JOIN". Please refer to ActiveQuery::joinWith for detailed usage of this method.
See also: joinWith()
public innerJoinWith ( string | array $with, boolean | array $eagerLoading = true )
$with string | array the relations to be joined with.
$eagerLoading boolean | array whether to eager loading the relations.
    public function innerJoinWith($with, $eagerLoading = true)
    {
        return $this->joinWith($with, $eagerLoading, 'INNER JOIN');
    }

Usage Example

 public function filterQuery(ActiveQuery $query)
 {
     if ($this->type) {
         $query->innerJoinWith('type');
         $query->andWhere(['{{death_reason_type}}.[[key]]' => $this->type]);
     }
     return $query;
 }
All Usage Examples Of yii\db\ActiveQuery::innerJoinWith