本文整理汇总了PHP中FileHandler::RemoveFilesInDir方法的典型用法代码示例。如果您正苦于以下问题:PHP FileHandler::RemoveFilesInDir方法的具体用法?PHP FileHandler::RemoveFilesInDir怎么用?PHP FileHandler::RemoveFilesInDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileHandler
的用法示例。
在下文中一共展示了FileHandler::RemoveFilesInDir方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createXeAdminMenu
/**
* Regenerate xe admin default menu
* @return void
*/
public function createXeAdminMenu()
{
//insert menu
$args = new stdClass();
$args->title = $this->adminMenuName;
$menuSrl = $args->menu_srl = getNextSequence();
$args->listorder = $args->menu_srl * -1;
$output = executeQuery('menu.insertMenu', $args);
Context::set('admin_menu_srl', $menuSrl);
unset($args);
// gnb item create
$gnbList = array('dashboard', 'menu', 'user', 'content', 'configuration', 'advanced');
foreach ($gnbList as $key => $value) {
//insert menu item
$args = new stdClass();
$args->menu_srl = $menuSrl;
$args->menu_item_srl = getNextSequence();
$args->name = '{$lang->menu_gnb[\'' . $value . '\']}';
if ($value == 'dashboard') {
$args->url = 'index.php?module=admin';
} else {
$args->url = '#';
}
$args->listorder = -1 * $args->menu_item_srl;
$output = executeQuery('menu.insertMenuItem', $args);
}
$oMenuAdminModel = getAdminModel('menu');
$columnList = array('menu_item_srl', 'name');
$output = $oMenuAdminModel->getMenuItems($menuSrl, 0, $columnList);
if (is_array($output->data)) {
foreach ($output->data as $key => $value) {
preg_match('/\\{\\$lang->menu_gnb\\[(.*?)\\]\\}/i', $value->name, $m);
$gnbDBList[$m[1]] = $value->menu_item_srl;
}
}
unset($args);
$gnbModuleList = array(0 => array('module' => 'menu', 'subMenu' => array('siteMap', 'siteDesign')), 1 => array('module' => 'member', 'subMenu' => array('userList', 'userSetting', 'userGroup')), 2 => array('module' => 'document', 'subMenu' => array('document')), 3 => array('module' => 'comment', 'subMenu' => array('comment')), 4 => array('module' => 'file', 'subMenu' => array('file')), 5 => array('module' => 'poll', 'subMenu' => array('poll')), 6 => array('module' => 'rss', 'subMenu' => array('rss')), 7 => array('module' => 'module', 'subMenu' => array('multilingual')), 8 => array('module' => 'importer', 'subMenu' => array('importer')), 9 => array('module' => 'trash', 'subMenu' => array('trash')), 10 => array('module' => 'autoinstall', 'subMenu' => array('easyInstall')), 11 => array('module' => 'layout', 'subMenu' => array('installedLayout')), 12 => array('module' => 'module', 'subMenu' => array('installedModule')), 13 => array('module' => 'widget', 'subMenu' => array('installedWidget')), 14 => array('module' => 'addon', 'subMenu' => array('installedAddon')), 15 => array('module' => 'editor', 'subMenu' => array('editor')), 16 => array('module' => 'spamfilter', 'subMenu' => array('spamFilter')), 17 => array('module' => 'admin', 'subMenu' => array('adminConfigurationGeneral', 'adminConfigurationFtp', 'adminMenuSetup')), 18 => array('module' => 'file', 'subMenu' => array('fileUpload')), 19 => array('module' => 'module', 'subMenu' => array('filebox')), 20 => array('module' => 'point', 'subMenu' => array('point')));
$oMemberModel = getModel('member');
$output = $oMemberModel->getAdminGroup(array('group_srl'));
$adminGroupSrl = $output->group_srl;
// gnb sub item create
// common argument setting
$args = new stdClass();
$args->menu_srl = $menuSrl;
$args->open_window = 'N';
$args->expand = 'N';
$args->normal_btn = '';
$args->hover_btn = '';
$args->active_btn = '';
$args->group_srls = $adminGroupSrl;
$oModuleModel = getModel('module');
foreach ($gnbModuleList as $key => $value) {
if (is_array($value['subMenu'])) {
$moduleActionInfo = $oModuleModel->getModuleActionXml($value['module']);
foreach ($value['subMenu'] as $key2 => $value2) {
$gnbKey = "'" . $this->_getGnbKey($value2) . "'";
//insert menu item
$args->menu_item_srl = getNextSequence();
$args->parent_srl = $gnbDBList[$gnbKey];
$args->name = '{$lang->menu_gnb_sub[\'' . $value2 . '\']}';
$args->url = 'index.php?module=admin&act=' . $moduleActionInfo->menu->{$value2}->index;
$args->listorder = -1 * $args->menu_item_srl;
$output = executeQuery('menu.insertMenuItem', $args);
}
}
}
$oMenuAdminConroller = getAdminController('menu');
$oMenuAdminConroller->makeXmlFile($menuSrl);
// does not recreate lang cache sometimes
FileHandler::RemoveFilesInDir('./files/cache/lang');
FileHandler::RemoveFilesInDir('./files/cache/menu/admin_lang');
}
示例2: createXeAdminMenu
/**
* Regenerate xe admin default menu
* @return void
*/
public function createXeAdminMenu()
{
//insert menu
$args = new stdClass();
$args->title = $this->adminMenuName;
$menuSrl = $args->menu_srl = getNextSequence();
$args->listorder = $args->menu_srl * -1;
$output = executeQuery('menu.insertMenu', $args);
Context::set('admin_menu_srl', $menuSrl);
unset($args);
// gnb item create
$gnbList = array('dashboard', 'menu', 'user', 'content', 'configuration', 'advanced');
foreach ($gnbList as $key => $value) {
//insert menu item
$args = new stdClass();
$args->menu_srl = $menuSrl;
$args->menu_item_srl = getNextSequence();
$args->name = '{$lang->menu_gnb[\'' . $value . '\']}';
if ($value == 'dashboard') {
$args->url = 'index.php?module=admin';
} else {
$args->url = '#';
}
$args->listorder = -1 * $args->menu_item_srl;
$output = executeQuery('menu.insertMenuItem', $args);
}
$oMenuAdminModel = getAdminModel('menu');
$columnList = array('menu_item_srl', 'name');
$output = $oMenuAdminModel->getMenuItems($menuSrl, 0, $columnList);
if (is_array($output->data)) {
foreach ($output->data as $key => $value) {
preg_match('/\\{\\$lang->menu_gnb\\[(.*?)\\]\\}/i', $value->name, $m);
$gnbDBList[$m[1]] = $value->menu_item_srl;
}
}
unset($args);
$gnbMenuStructure = array('menu' => array('menu.siteMap', 'menu.siteDesign'), 'user' => array('member.userList', 'member.userSetting', 'member.userGroup', 'point.point'), 'content' => array('board.board', 'document.document', 'comment.comment', 'file.file', 'poll.poll', 'editor.editor', 'importer.importer', 'spamfilter.spamFilter', 'trash.trash'), 'configuration' => array('admin.adminConfigurationGeneral', 'admin.adminConfigurationFtp', 'admin.adminMenuSetup', 'file.fileUpload', 'module.filebox'), 'advanced' => array('autoinstall.easyInstall', 'layout.installedLayout', 'module.installedModule', 'addon.installedAddon', 'widget.installedWidget', 'module.multilingual', 'rss.rss'));
$oMemberModel = getModel('member');
$output = $oMemberModel->getAdminGroup(array('group_srl'));
$adminGroupSrl = $output->group_srl;
// gnb common argument setting
$args = new stdClass();
$args->menu_srl = $menuSrl;
$args->open_window = 'N';
$args->expand = 'N';
$args->normal_btn = '';
$args->hover_btn = '';
$args->active_btn = '';
$args->group_srls = $adminGroupSrl;
$oModuleModel = getModel('module');
$moduleActionInfo = array();
foreach ($gnbMenuStructure as $key => $items) {
foreach ($items as $item) {
list($module_name, $menu_name) = explode('.', $item);
if (!isset($moduleActionInfo[$module_name])) {
$moduleActionInfo[$module_name] = $oModuleModel->getModuleActionXml($module_name);
}
$args->menu_item_srl = getNextSequence();
$args->parent_srl = $gnbDBList["'" . $key . "'"];
$args->name = '{$lang->menu_gnb_sub[\'' . $menu_name . '\']}';
$args->url = 'index.php?module=admin&act=' . $moduleActionInfo[$module_name]->menu->{$menu_name}->index;
$args->listorder = -1 * $args->menu_item_srl;
$output = executeQuery('menu.insertMenuItem', $args);
}
}
$oMenuAdminConroller = getAdminController('menu');
$oMenuAdminConroller->makeXmlFile($menuSrl);
// does not recreate lang cache sometimes
FileHandler::RemoveFilesInDir('./files/cache/lang');
FileHandler::RemoveFilesInDir('./files/cache/menu/admin_lang');
}