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

		return self::queryByParentModelId( $parentId, $parentType, $modelId )->andWhere( 'type=:type', [ ':type' => $type ] )->one();
	}
public static function findFirstByParentModelIdType( $parentId, $parentType, $modelId, $type ) {

		return self::queryByParentModelId( $parentId, $parentType, $modelId )->andWhere( 'type=:type', [ ':type' => $type ] )->one();
	}
public static function findFirstByParentModelIdType ( $ parentId , $ parentType , $ modelId , $ type ) { return self :: queryByParentModelId ( $ parentId , $ parentType , $ modelId ) -> andWhere ( 'type=:type' , [ ':type' => $ type ] ) -> one ( ) ; }
Find and return the mapping for given parent id, parent type, model id and type. It's
useful for the cases where only one mapping is allowed for a parent, model and type.

@param integer $parentId
@param string $parentType
@param integer $modelId
@param integer $type
@return \cmsgears\core\common\models\base\ActiveRecord
Find and return the mapping for given parent id parent type model id and type . It s useful for the cases where only one mapping is allowed for a parent model and type .