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

		return self::queryByParentModelId( $parentId, $parentType, $modelId )->andWhere( 'active=1' )->one();
	}
public static function findFirstActiveByParentModelId( $parentId, $parentType, $modelId ) {

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

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