core-bundle/src/Resources/contao/models/FilesModel.php
public static function findByUuid($strUuid, array $arrOptions=array())
	{
		$t = static::$strTable;

		// Convert UUIDs to binary
		if (Validator::isStringUuid($strUuid))
		{
			$strUuid = StringUtil::uuidToBin($strUuid);
		}

		// Check the model registry (does not work by default due to UNHEX())
		if (empty($arrOptions))
		{
			/** @var FilesModel $objModel */
			$objModel = Registry::getInstance()->fetch(static::$strTable, $strUuid, 'uuid');

			if ($objModel !== null)
			{
				return $objModel;
			}
		}

		return static::findOneBy(array("$t.uuid=UNHEX(?)"), bin2hex($strUuid), $arrOptions);
	}
public static function findByUuid($strUuid, array $arrOptions=array())
	{
		$t = static::$strTable;

		// Convert UUIDs to binary
		if (Validator::isStringUuid($strUuid))
		{
			$strUuid = StringUtil::uuidToBin($strUuid);
		}

		// Check the model registry (does not work by default due to UNHEX())
		if (empty($arrOptions))
		{
			/** @var FilesModel $objModel */
			$objModel = Registry::getInstance()->fetch(static::$strTable, $strUuid, 'uuid');

			if ($objModel !== null)
			{
				return $objModel;
			}
		}

		return static::findOneBy(array("$t.uuid=UNHEX(?)"), bin2hex($strUuid), $arrOptions);
	}
public static function findByUuid ( $ strUuid , array $ arrOptions = array ( ) ) { $ t = static :: $ strTable ; // Convert UUIDs to binary if ( Validator :: isStringUuid ( $ strUuid ) ) { $ strUuid = StringUtil :: uuidToBin ( $ strUuid ) ; } // Check the model registry (does not work by default due to UNHEX()) if ( empty ( $ arrOptions ) ) { /** @var FilesModel $objModel */ $ objModel = Registry :: getInstance ( ) -> fetch ( static :: $ strTable , $ strUuid , 'uuid' ) ; if ( $ objModel !== null ) { return $ objModel ; } } return static :: findOneBy ( array ( "$t.uuid=UNHEX(?)" ) , bin2hex ( $ strUuid ) , $ arrOptions ) ; }
Find a file by its UUID

@param string $strUuid    The UUID string
@param array  $arrOptions An optional options array

@return FilesModel|null The model or null if there is no file
Find a file by its UUID