From: Marcel Werk Date: Thu, 6 Jun 2013 01:36:01 +0000 (+0200) Subject: Small optimization X-Git-Tag: 2.0.0_Beta_4~119 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=272e7c4f4ab622b9ef0f5843458cdfdfaf4f1182;p=GitHub%2FWoltLab%2FWCF.git Small optimization --- diff --git a/wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php b/wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php index 45d4317d77..b4bf125f79 100644 --- a/wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php +++ b/wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php @@ -162,6 +162,20 @@ class ObjectTypeCache extends SingletonFactory { return null; } + /** + * Gets the object type id with the given definition name and given name. + * + * @param string $definitionName + * @param string $objectTypeName + * @return integer + */ + public function getObjectTypeIDByName($definitionName, $objectTypeName) { + $objectType = $this->getObjectTypeByName($definitionName, $objectTypeName); + if ($objectType !== null) return $objectType->objectTypeID; + + return null; + } + /** * Resets and reloads the object type cache. */