diff --git a/classes/file/PKPLibraryFileManager.php b/classes/file/PKPLibraryFileManager.php index 877c945f982..78cede096bc 100644 --- a/classes/file/PKPLibraryFileManager.php +++ b/classes/file/PKPLibraryFileManager.php @@ -20,6 +20,7 @@ use PKP\context\LibraryFile; use PKP\context\LibraryFileDAO; use PKP\db\DAORegistry; +use PKP\plugins\Hook; class PKPLibraryFileManager extends PrivateFileManager { @@ -168,6 +169,7 @@ public function getFileSuffixFromType($type) /** * Get the type => suffix mapping array * + * @hook PublisherLibrary::types::suffixes [[&$map]] * @return array */ public function &getTypeSuffixMap() @@ -178,6 +180,7 @@ public function &getTypeSuffixMap() LibraryFile::LIBRARY_FILE_TYPE_REPORT => 'REP', LibraryFile::LIBRARY_FILE_TYPE_OTHER => 'OTH' ]; + Hook::call('PublisherLibrary::types::suffixes', [&$map]); return $map; } @@ -199,6 +202,7 @@ public function getNameFromType($type) /** * Get the type => locale key mapping array * + * @hook PublisherLibrary::types::titles [[&$map]] * @return array */ public function &getTypeTitleKeyMap() @@ -209,6 +213,7 @@ public function &getTypeTitleKeyMap() LibraryFile::LIBRARY_FILE_TYPE_REPORT => 'settings.libraryFiles.category.reports', LibraryFile::LIBRARY_FILE_TYPE_OTHER => 'settings.libraryFiles.category.other' ]; + Hook::call('PublisherLibrary::types::titles', [&$map]); return $map; } @@ -226,6 +231,7 @@ public function getTitleKeyFromType($type) /** * Get the type => name mapping array * + * @hook PublisherLibrary::types::names [[&$typeNameMap]] * @return array */ public function &getTypeNameMap() @@ -236,6 +242,7 @@ public function &getTypeNameMap() LibraryFile::LIBRARY_FILE_TYPE_REPORT => 'reports', LibraryFile::LIBRARY_FILE_TYPE_OTHER => 'other', ]; + Hook::call('PublisherLibrary::types::names', [&$typeNameMap]); return $typeNameMap; } }