common/models/mappers/ModelFile.php
public static function findByFileTag( $parentId, $parentType, $fileTag, $type = null ) {

		$mapTable	= static::tableName();
		$fileTable	= CoreTables::getTableName( CoreTables::TABLE_FILE );

		if( empty( $type ) ) {

			$type = CoreGlobal::TYPE_DEFAULT;
		}

		return self::queryByParent( $parentId, $parentType )->andWhere( "$fileTable.tag=:tag AND $mapTable.type=:type", [ ':tag' => $fileTag, ':type' => $type ] )->one();
	}
public static function findByFileTag( $parentId, $parentType, $fileTag, $type = null ) {

		$mapTable	= static::tableName();
		$fileTable	= CoreTables::getTableName( CoreTables::TABLE_FILE );

		if( empty( $type ) ) {

			$type = CoreGlobal::TYPE_DEFAULT;
		}

		return self::queryByParent( $parentId, $parentType )->andWhere( "$fileTable.tag=:tag AND $mapTable.type=:type", [ ':tag' => $fileTag, ':type' => $type ] )->one();
	}
public static function findByFileTag ( $ parentId , $ parentType , $ fileTag , $ type = null ) { $ mapTable = static :: tableName ( ) ; $ fileTable = CoreTables :: getTableName ( CoreTables :: TABLE_FILE ) ; if ( empty ( $ type ) ) { $ type = CoreGlobal :: TYPE_DEFAULT ; } return self :: queryByParent ( $ parentId , $ parentType ) -> andWhere ( "$fileTable.tag=:tag AND $mapTable.type=:type" , [ ':tag' => $ fileTag , ':type' => $ type ] ) -> one ( ) ; }
Find and return the mappings for given title. It's useful in cases where unique
title is required for file.

@param integer $parentId
@param string $parentType
@param string $fileTag
@return ModelFile
Find and return the mappings for given title . It s useful in cases where unique title is required for file .