本文整理匯總了PHP中CRM_Utils_File::getFilesByExtension方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Utils_File::getFilesByExtension方法的具體用法?PHP CRM_Utils_File::getFilesByExtension怎麽用?PHP CRM_Utils_File::getFilesByExtension使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRM_Utils_File
的用法示例。
在下文中一共展示了CRM_Utils_File::getFilesByExtension方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: str_replace
static function &xmlItems()
{
if (!self::$_items) {
$config = CRM_Core_Config::singleton();
// We needs this until Core becomes a component
$coreMenuFilesNamespace = 'CRM_Core_xml_Menu';
$coreMenuFilesPath = str_replace('_', DIRECTORY_SEPARATOR, $coreMenuFilesNamespace);
global $civicrm_root;
$files = CRM_Utils_File::getFilesByExtension($civicrm_root . DIRECTORY_SEPARATOR . $coreMenuFilesPath, 'xml');
// Grab component menu files
$files = array_merge($files, CRM_Core_Component::xmlMenu());
// lets call a hook and get any additional files if needed
CRM_Utils_Hook::xmlMenu($files);
self::$_items = array();
foreach ($files as $file) {
self::read($file, self::$_items);
}
}
return self::$_items;
}
示例2: menuFiles
/**
* Provides the xml menu files
*
* @return array array of menu files
* @access public
*
*/
public function menuFiles()
{
return CRM_Utils_File::getFilesByExtension($this->_getMenuXMLPath(), 'xml');
}