common/models/base/ModelMapper.php
public static function queryByParent( $parentId, $parentType ) {

		$tableName = static::tableName();

		return self::queryWithModel()->where( "$tableName.parentId=:pid AND $tableName.parentType=:ptype", [ ':pid' => $parentId, ':ptype' => $parentType ] );
	}
public static function queryByParent( $parentId, $parentType ) {

		$tableName = static::tableName();

		return self::queryWithModel()->where( "$tableName.parentId=:pid AND $tableName.parentType=:ptype", [ ':pid' => $parentId, ':ptype' => $parentType ] );
	}
public static function queryByParent ( $ parentId , $ parentType ) { $ tableName = static :: tableName ( ) ; return self :: queryWithModel ( ) -> where ( "$tableName.parentId=:pid AND $tableName.parentType=:ptype" , [ ':pid' => $ parentId , ':ptype' => $ parentType ] ) ; }
Return query to find the mapping for given parent id and parent type.

@param integer $parentId
@param string $parentType
@return \yii\db\ActiveQuery to find using parent id and parent type.
Return query to find the mapping for given parent id and parent type .