• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getLabel函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getLabel函数的典型用法代码示例。如果您正苦于以下问题:PHP getLabel函数的具体用法?PHP getLabel怎么用?PHP getLabel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getLabel函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: last

 public function last()
 {
     $this->setDataType("settings");
     $this->setActionType("view");
     $preParams = array();
     $data = $this->prepareData($preParams, 'settings');
     $pool = ConnectionPool::getInstance();
     $connection = $pool->getConnection();
     umiEventFeed::setConnection($connection);
     umiEventFeedType::setConnection($connection);
     $user = $this->getUser();
     $settings = umiEventFeedType::getAllowedList($user->getSettings());
     $newEvents = array('nodes:new-event' => array());
     foreach ($settings as $typeId) {
         $count = umiEventFeed::getListCount(array($typeId), $user->getId());
         if (!$count) {
             continue;
         }
         $newEvents['nodes:new-event'][$typeId]['attribute:type-id'] = $typeId;
         $newEvents['nodes:new-event'][$typeId]['attribute:count'] = $count;
         $newEvents['nodes:new-event'][$typeId]['attribute:name'] = getLabel($typeId . '_new');
         $newEvents['nodes:new-event'][$typeId]['attribute:img'] = getLabel($typeId . '_img');
         $newEvents['nodes:new-event'][$typeId]['events'] = array('nodes:events' => array());
         $typeEvents = umiEventFeed::getUnreadList($typeId, $user->getId(), 3);
         foreach ($typeEvents as $eventId => $event) {
             $newEvents['nodes:new-event'][$typeId]['events']['nodes:event'][$eventId] = self::renderEvent($event);
         }
     }
     $data['new-events'] = $newEvents;
     $this->setData($data);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:32,代码来源:__admin.php


示例2: guide_items

	public function guide_items($guide_id = false, $per_page = false, $curr_page = 0) {
		$this->setDataType("list");
		$this->setActionType("modify");

		if(!$curr_page) $curr_page = (int) getRequest('p');
		if(!$per_page) $per_page = getRequest('per_page_limit');
		if(!$per_page) $per_page = $this->per_page;
		if(!$guide_id) $guide_id = (int) getRequest('param0');
		$mode = (string) getRequest('param1');

		if($guide = selector::get('object-type')->id($guide_id)) {
			$this->setHeaderLabel(getLabel('header-data-guide_items') . ' "' . $guide->getName() . '"');
		}
		if($this->ifNotXmlMode()) return $this->doData();

		$sel = new selector('objects');
		$sel->types('object-type')->id($guide_id);
		$sel->limit($per_page * $curr_page, $per_page);

		selectorHelper::detectFilters($sel);

		if($mode == "do") {
			$params = array(
				"type_id" => $guide_id
			);
			$this->saveEditedList("objects", $params);
			$this->chooseRedirect();
		}

		$this->setDataRange($per_page, $curr_page * $per_page);
		$data = $this->prepareData($sel->result, "objects");
		$this->setData($data, $sel->total);
		return $this->doData();
	}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:34,代码来源:__guides.php


示例3: systemEventsNotify

 public function systemEventsNotify(iUmiEventPoint $event)
 {
     $eventId = $event->getEventId();
     $titleLabel = $titleLabel = 'event-' . $eventId . '-title';
     $contentLabel = 'event-' . $eventId . '-content';
     $title = getLabel($titleLabel, 'common/content/config');
     $content = getLabel($contentLabel, 'common/content/config');
     if ($titleLabel == $title) {
         return;
     }
     if ($element = $event->getRef('element')) {
         $hierarchy = umiHierarchy::getInstance();
         $oldbForce = $hierarchy->forceAbsolutePath(true);
         $params = array('%page-name%' => $element->name, '%page-link%' => $element->link);
         $hierarchy->forceAbsolutePath($oldbForce);
     } else {
         $params = array();
     }
     if ($object = $event->getRef('object')) {
         $params['%object-name%'] = $object->name;
         $objectTypes = umiObjectTypesCollection::getInstance();
         $objectType = $objectTypes->getType($object->getTypeId());
         if ($hierarchyTypeId = $objectType->getHierarchyTypeId()) {
             $hierarchyTypes = umiHierarchyTypesCollection::getInstance();
             $hierarchyType = $hierarchyTypes->getType($hierarchyTypeId);
             $params['%object-type%'] = $hierarchyType->getTitle();
         }
     }
     $title = str_replace(array_keys($params), array_values($params), $title);
     $content = str_replace(array_keys($params), array_values($params), $content);
     $this->dispatchSystemEvent($title, $content);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:32,代码来源:__mess_events.php


示例4: last

 public function last()
 {
     $this->setDataType("settings");
     $this->setActionType("view");
     $vf9a0f0fbe51f3ec810ee16d6774e434e = array();
     $v8d777f385d3dfec8815d20f7496026dc = $this->prepareData($vf9a0f0fbe51f3ec810ee16d6774e434e, 'settings');
     $vb10a8c0bede9eb4ea771b04db3149f28 = ConnectionPool::getInstance();
     $v4717d53ebfdfea8477f780ec66151dcb = $vb10a8c0bede9eb4ea771b04db3149f28->getConnection();
     umiEventFeed::setConnection($v4717d53ebfdfea8477f780ec66151dcb);
     umiEventFeedType::setConnection($v4717d53ebfdfea8477f780ec66151dcb);
     $vee11cbb19052e40b07aac0ca060c23ee = $this->getUser();
     $v2e5d8aa3dfa8ef34ca5131d20f9dad51 = umiEventFeedType::getAllowedList($vee11cbb19052e40b07aac0ca060c23ee->getSettings());
     $vfc7f6423b4974f8363e6cd8f3e9a6c78 = array('nodes:new-event' => array());
     foreach ($v2e5d8aa3dfa8ef34ca5131d20f9dad51 as $v5f694956811487225d15e973ca38fbab) {
         $ve2942a04780e223b215eb8b663cf5353 = umiEventFeed::getListCount(array($v5f694956811487225d15e973ca38fbab), $vee11cbb19052e40b07aac0ca060c23ee->getId());
         if (!$ve2942a04780e223b215eb8b663cf5353) {
             continue;
         }
         $vfc7f6423b4974f8363e6cd8f3e9a6c78['nodes:new-event'][$v5f694956811487225d15e973ca38fbab]['attribute:type-id'] = $v5f694956811487225d15e973ca38fbab;
         $vfc7f6423b4974f8363e6cd8f3e9a6c78['nodes:new-event'][$v5f694956811487225d15e973ca38fbab]['attribute:count'] = $ve2942a04780e223b215eb8b663cf5353;
         $vfc7f6423b4974f8363e6cd8f3e9a6c78['nodes:new-event'][$v5f694956811487225d15e973ca38fbab]['attribute:name'] = getLabel($v5f694956811487225d15e973ca38fbab . '_new');
         $vfc7f6423b4974f8363e6cd8f3e9a6c78['nodes:new-event'][$v5f694956811487225d15e973ca38fbab]['attribute:img'] = getLabel($v5f694956811487225d15e973ca38fbab . '_img');
         $vfc7f6423b4974f8363e6cd8f3e9a6c78['nodes:new-event'][$v5f694956811487225d15e973ca38fbab]['events'] = array('nodes:events' => array());
         $vdeb9fb6f3a9c98f75f1ee3cdd8ffa40e = umiEventFeed::getUnreadList($v5f694956811487225d15e973ca38fbab, $vee11cbb19052e40b07aac0ca060c23ee->getId(), 3);
         foreach ($vdeb9fb6f3a9c98f75f1ee3cdd8ffa40e as $v53cc4db543d7a569e51c1d76ac6f278e => $v4119639092e62c55ea8be348e4d9260d) {
             $vfc7f6423b4974f8363e6cd8f3e9a6c78['nodes:new-event'][$v5f694956811487225d15e973ca38fbab]['events']['nodes:event'][$v53cc4db543d7a569e51c1d76ac6f278e] = self::renderEvent($v4119639092e62c55ea8be348e4d9260d);
         }
     }
     $v8d777f385d3dfec8815d20f7496026dc['new-events'] = $vfc7f6423b4974f8363e6cd8f3e9a6c78;
     $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:32,代码来源:__admin.php


示例5: _network_settings

		public function _network_settings($network) {
			$this->setHeaderLabel(getLabel("header-social_networks-settings") . $network->getName());

			$mode = getRequest("param0");
			$cmsController = cmsController::getInstance();

			$type = $network->getCodeName();

			$module = $cmsController->getCurrentModule();
			$method = $cmsController->getCurrentMethod();
			$config = mainConfiguration::getInstance();
			$templateId = $config->get("templates", "{$module}.{$method}");

			$inputData = array(
				'object' => $network->getObject(),
				'type' => $type
			);

			if($mode == "do") {
				$config->set("templates", "{$module}.{$method}", getRequest('template-id'));
				$object = $this->saveEditedObjectData($inputData);
				$this->chooseRedirect($this->pre_lang . '/admin/social_networks/' . $type . '/');
			}

			$this->setDataType("form");
			$this->setActionType("modify");

			$data = $this->prepareData($inputData, "object");
			$data['template-id'] = array('@id' => $templateId);

			$this->setData($data);
			return $this->doData();
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:33,代码来源:__admin.php


示例6: stream_open

 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     $v264a818e305e0550c3ee63761dd3d911 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     try {
         if (!is_array($v8d777f385d3dfec8815d20f7496026dc)) {
             $v8d777f385d3dfec8815d20f7496026dc = $this->executeMacros($v264a818e305e0550c3ee63761dd3d911);
             if ($v8d777f385d3dfec8815d20f7496026dc === false) {
                 $v8d777f385d3dfec8815d20f7496026dc = array('error' => array('attribute:code' => 'require-more-permissions', 'node:message' => getLabel('error-require-more-permissions')));
             }
         }
     } catch (publicException $ve1671797c52e15f763380b45e841ec32) {
         $vcb5e100e5a9a3e7f6d1fd97512215282 = array();
         if ($v8e95bd427d65fbeeedb980f640074ea2 = $ve1671797c52e15f763380b45e841ec32->getCode()) {
             $vcb5e100e5a9a3e7f6d1fd97512215282['attribute:code'] = $v8e95bd427d65fbeeedb980f640074ea2;
         }
         if ($v1634f20805d929bd08a1f418a78c0615 = $ve1671797c52e15f763380b45e841ec32->getStrCode()) {
             $vcb5e100e5a9a3e7f6d1fd97512215282['attribute:str-code'] = $v1634f20805d929bd08a1f418a78c0615;
         }
         $vcb5e100e5a9a3e7f6d1fd97512215282['node:message'] = $ve1671797c52e15f763380b45e841ec32->getMessage();
         $v8d777f385d3dfec8815d20f7496026dc = array("error" => $vcb5e100e5a9a3e7f6d1fd97512215282);
     }
     if ($v8d777f385d3dfec8815d20f7496026dc === false) {
         return true;
     } else {
         $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml(getArrayKey($v264a818e305e0550c3ee63761dd3d911, 'module'), getArrayKey($v264a818e305e0550c3ee63761dd3d911, 'method'), $v8d777f385d3dfec8815d20f7496026dc);
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveData($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:35,代码来源:udataStream.php


示例7: profile

 public function profile($template = "default", $user_id = false)
 {
     if (!$template) {
         $template = "default";
     }
     list($template_block, $template_bad_user_block) = def_module::loadTemplates("users/profile/" . $template, "profile_block", "bad_user_block");
     $block_arr = array();
     if (!$user_id) {
         $user_id = (int) getRequest('param0');
     }
     if (!$user_id) {
         $permissions = permissionsCollection::getInstance();
         if ($permissions->isAuth()) {
             $user_id = $permissions->getUserId();
         }
     }
     if ($user = selector::get('object')->id($user_id)) {
         $this->validateEntityByTypes($user, array('module' => 'users', 'method' => 'user'));
         $block_arr['xlink:href'] = "uobject://" . $user_id;
         $userTypeId = $user->getTypeId();
         if ($userType = umiObjectTypesCollection::getInstance()->getType($userTypeId)) {
             $userHierarchyTypeId = $userType->getHierarchyTypeId();
             if ($userHierarchyType = umiHierarchyTypesCollection::getInstance()->getType($userHierarchyTypeId)) {
                 if ($userHierarchyType->getName() == "users" && $userHierarchyType->getExt() == "user") {
                     $block_arr['id'] = $user_id;
                     return def_module::parseTemplate($template_block, $block_arr, false, $user_id);
                 }
             }
         }
     } else {
         throw new publicException(getLabel('error-object-does-not-exist', null, $user_id));
     }
     return def_module::parseTemplate($template_bad_user_block, $block_arr);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:34,代码来源:__profile.php


示例8: getItemLabel

 function getItemLabel()
 {
     if (!$this->itemLbl) {
         $this->itemLbl = getLabel($this->item, 'rule_action');
     }
     return $this->itemLbl;
 }
开发者ID:katopenzz,项目名称:openemr,代码行数:7,代码来源:RuleAction.php


示例9: CdrResults

 function CdrResults($rule_id = "", $active_alert_flag = "", $passive_alert_flag = "", $patient_reminder_flag = "")
 {
     $this->id = $rule_id;
     $this->rule = getLabel($this->id, 'clinical_rules');
     $this->active_flag = $active_alert_flag;
     $this->passive_flag = $passive_alert_flag;
     $this->reminder_flag = $patient_reminder_flag;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:8,代码来源:CdrHelper.class.php


示例10: viewAuthor

 public function viewAuthor($author_id = false, $template = "default")
 {
     if ($author_id === false) {
         throw new publicException(getLabel('error-object-does-not-exist', null, $author_id));
     }
     if (!($author = umiObjectsCollection::getInstance()->getObject($author_id))) {
         throw new publicException(getLabel('error-object-does-not-exist', null, $author_id));
     }
     if (!$template) {
         $template = "default";
     }
     list($template_user, $template_guest, $template_sv) = def_module::loadTemplates("users/author/{$template}", "user_block", "guest_block", "sv_block");
     $block_arr = array();
     if ($author->getTypeId() == umiObjectTypesCollection::getInstance()->getBaseType('users', 'user')) {
         $template = $template_user;
         $block_arr['user_id'] = $author_id;
         $user = $author;
         $block_arr['nickname'] = $user->getValue("login");
         $block_arr['email'] = $user->getValue("e-mail");
         $block_arr['fname'] = $user->getValue("fname");
         $block_arr['lname'] = $user->getValue("lname");
         $block_arr['subnodes:groups'] = $groups = $user->getValue("groups");
         if (in_array(SV_GROUP_ID, $groups)) {
             if ($template_sv) {
                 $template = $template_sv;
             }
         }
     } else {
         if ($author->getValue("is_registrated")) {
             $template = $template_user;
             $block_arr['user_id'] = $user_id = $author->getValue("user_id");
             $user = umiObjectsCollection::getInstance()->getObject($user_id);
             if (!$user instanceof umiObject) {
                 $block_arr['user_id'] = $user_id = intval(regedit::getInstance()->getVal("//modules/users/guest_id"));
                 $user = umiObjectsCollection::getInstance()->getObject($user_id);
             }
             if (!$user instanceof umiObject) {
                 return false;
             }
             $block_arr['nickname'] = $user->getValue("login");
             $block_arr['login'] = $user->getValue("login");
             $block_arr['email'] = $user->getValue("e-mail");
             $block_arr['fname'] = $user->getValue("fname");
             $block_arr['lname'] = $user->getValue("lname");
             $block_arr['subnodes:groups'] = $groups = $user->getValue("groups");
             if (in_array(SV_GROUP_ID, $groups)) {
                 if ($template_sv) {
                     $template = $template_sv;
                 }
             }
         } else {
             $template = $template_guest;
             $block_arr['nickname'] = $author->getValue("nickname");
             $block_arr['email'] = $author->getValue("email");
         }
     }
     return def_module::parseTemplate($template, $block_arr, false, $author_id);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:58,代码来源:__author.php


示例11: __construct

 function __construct($rule_id = "", $active_alert_flag = "", $passive_alert_flag = "", $patient_reminder_flag = "", $access_control = "")
 {
     $this->id = $rule_id;
     $this->rule = getLabel($this->id, 'clinical_rules');
     $this->active_flag = $active_alert_flag;
     $this->passive_flag = $passive_alert_flag;
     $this->reminder_flag = $patient_reminder_flag;
     $this->access_control = $access_control;
 }
开发者ID:mi-squared,项目名称:openemr,代码行数:9,代码来源:CdrHelper.class.php


示例12: translateLabel

 protected function translateLabel($vd304ba20e96d87411588eeabac850e34)
 {
     $v851f5ac9941d720844d143ed9cfcf60a = "i18n::";
     if (substr($vd304ba20e96d87411588eeabac850e34, 0, strlen($v851f5ac9941d720844d143ed9cfcf60a)) == $v851f5ac9941d720844d143ed9cfcf60a) {
         $v341be97d9aff90c9978347f66f945b77 = getLabel(substr($vd304ba20e96d87411588eeabac850e34, strlen($v851f5ac9941d720844d143ed9cfcf60a)));
     } else {
         $v341be97d9aff90c9978347f66f945b77 = getLabel($vd304ba20e96d87411588eeabac850e34);
     }
     return is_null($v341be97d9aff90c9978347f66f945b77) ? $vd304ba20e96d87411588eeabac850e34 : $v341be97d9aff90c9978347f66f945b77;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:10,代码来源:singletone.php


示例13: getLabel

 protected function getLabel($i18n)
 {
     $vd304ba20e96d87411588eeabac850e34 = getLabel($i18n);
     if (!$vd304ba20e96d87411588eeabac850e34 || $vd304ba20e96d87411588eeabac850e34 == $i18n) {
         $vd304ba20e96d87411588eeabac850e34 = str_replace('label-', '', $i18n);
         $vd304ba20e96d87411588eeabac850e34 = preg_replace("/(.*?)-[m,f,n]+\$/", "\$1", $vd304ba20e96d87411588eeabac850e34);
         $vd304ba20e96d87411588eeabac850e34 = str_replace('-', ' ', $vd304ba20e96d87411588eeabac850e34);
     }
     return $vd304ba20e96d87411588eeabac850e34;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:10,代码来源:xmlImporter.php


示例14: post_review

 function post_review()
 {
     // change the wording for errors here
     // do not change the keys of the array
     $this->_errors = array('no_author' => getLabel('CR_ERROR_NO_AUTHOR'), 'no_review' => getLabel('CR_ERROR_NO_REVIEW'), 'no_rating' => getLabel('CR_ERROR_NO_RATING'), 'no_product' => getLabel('CR_ERROR_NO_PRODUCT'), 'disabled' => getLabel('CR_ERROR_DISABLED'), 'multiple' => getLabel('CR_ERROR_MULTIPLE'), 'anonymous' => getLabel('CR_ERROR_ANONYMOUS'));
     // change the wording for success here
     // do not change the keys of the array
     $this->_success = array('added' => getLabel('CR_SUCCESS_ADDED'), 'accepted' => getLabel('CR_SUCCESS_ACCEPTED'));
     // setting posted cr_id to 0
     $this->_cr_id_posted = 0;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:11,代码来源:post_review_cz.php


示例15: _action_getrows

 function _action_getrows()
 {
     $rows = array();
     $rules = resolve_rules_sql('', '0', TRUE);
     foreach ($rules as $rowRule) {
         $title = getLabel($rowRule['id'], 'clinical_rules');
         $type = "Reminder";
         $row = array("title" => $title, "type" => $type, "id" => $rowRule['id']);
         $rows[] = $row;
     }
     $this->emit_json($rows);
 }
开发者ID:katopenzz,项目名称:openemr,代码行数:12,代码来源:controller.php


示例16: number

 public function number()
 {
     $sel = new selector('objects');
     $sel->types('object-type')->name('emarket', 'order');
     $sel->order('number')->desc();
     $sel->limit(0, 1);
     $number = $sel->first ? $sel->first->number + 1 : 1;
     $order = $this->order;
     $order->name = getLabel('order-name-prefix', 'emarket', $number);
     $order->number = $number;
     $order->commit();
     return $number;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:13,代码来源:default.php


示例17: discount_add

 public function discount_add()
 {
     $inputData = array("type" => "discount");
     $mode = (string) getRequest('param0');
     if ($mode == "do") {
         $data = getArrayKey(getRequest('data'), 'new');
         //Create new dicsount
         $discountName = getRequest('name');
         $discountTypeId = getArrayKey($data, 'discount_type_id');
         try {
             $discount = discount::add($discountName, $discountTypeId);
             //Apply modificator
             $modificatorId = getArrayKey($data, 'discount_modificator_id');
             try {
                 $modificatorTypeObject = $this->expectObject($modificatorId, true, true);
             } catch (publicAdminException $e) {
                 if ($discount) {
                     $discount->delete();
                 }
                 $this->errorNewMessage(getLabel('error-modificator-required'));
                 $this->errorPanic();
             }
             $modificatorObject = discountModificator::create($discount, $modificatorTypeObject);
             $discount->setDiscountModificator($modificatorObject);
             //Apply rules
             $rulesId = getArrayKey($data, 'discount_rules_id');
             foreach ($rulesId as $ruleId) {
                 $ruleTypeObject = $this->expectObject($ruleId, true, true);
                 $ruleObject = discountRule::create($discount, $ruleTypeObject);
                 if ($ruleObject instanceof discountRule == false) {
                     $discount->delete();
                     throw new publicAdminException("discountRule #{$ruleId} \"{$ruleTypeObject->name}\" class not found");
                 }
                 $discount->appendDiscountRule($ruleObject);
             }
             $discount->commit();
         } catch (valueRequiredException $e) {
             $this->errorNewMessage($e->getMessage());
             $this->errorPanic();
         }
         $this->chooseRedirect($this->pre_lang . "/admin/emarket/discount_edit/" . $discount->getId() . "/");
     }
     $this->setDataType("form");
     $this->setActionType("create");
     $data = $this->prepareData($inputData, "object");
     $this->setData($data);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:48,代码来源:__admin_discounts.php


示例18: import_do

 public function import_do()
 {
     $this->setDataType("list");
     $this->setActionType("view");
     $id = getRequest('param0');
     $objects = umiObjectsCollection::getInstance();
     $settings = $objects->getObject($id);
     if (!$settings instanceof umiObject) {
         throw new publicException(getLabel("exchange-err-settings_notfound"));
     }
     $importFile = $settings->file;
     if (!$importFile instanceof umiFile || $importFile->getIsBroken()) {
         throw new publicException(getLabel("exchange-err-importfile"));
     }
     $format_id = $settings->format;
     $importFormat = $objects->getObject($format_id);
     if (!$importFormat instanceof umiObject) {
         throw new publicException(getLabel("exchange-err-format_undefined"));
     }
     $suffix = $importFormat->sid;
     $import_offset = (int) getSession("import_offset_" . $id);
     $blockSize = mainConfiguration::getInstance()->get("modules", "exchange.splitter.limit") ? mainConfiguration::getInstance()->get("modules", "exchange.splitter.limit") : 25;
     $splitter = umiImportSplitter::get($suffix);
     $splitter->load($importFile->getFilePath(), $blockSize, $import_offset);
     $doc = $splitter->getDocument();
     $dump = $splitter->translate($doc);
     $oldIgnoreSiteMap = umiHierarchy::$ignoreSiteMap;
     umiHierarchy::$ignoreSiteMap = true;
     $importer = new xmlImporter();
     $importer->loadXmlString($dump);
     $elements = $settings->elements;
     if (is_array($elements) && count($elements)) {
         $importer->setDestinationElement($elements[0]);
     }
     $importer->setIgnoreParentGroups($splitter->ignoreParentGroups);
     $importer->setAutoGuideCreation($splitter->autoGuideCreation);
     $importer->setRenameFiles($splitter->getRenameFiles());
     $importer->execute();
     umiHierarchy::$ignoreSiteMap = $oldIgnoreSiteMap;
     $_SESSION["import_offset_" . $id] = $splitter->getOffset();
     if ($splitter->getIsComplete()) {
         unset($_SESSION["import_offset_" . $id]);
     }
     $data = array("attribute:complete" => (int) $splitter->getIsComplete(), "attribute:created" => $importer->created_elements, "attribute:updated" => $importer->updated_elements, "attribute:deleted" => $importer->deleted_elements, "attribute:errors" => $importer->import_errors, "nodes:log" => $importer->getImportLog());
     $this->setData($data);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:47,代码来源:__import.php


示例19: getUserSettings

 /**
  * Получить типы событий, отслеживаемые пользователем
  */
 public function getUserSettings()
 {
     $pool = ConnectionPool::getInstance();
     $connection = $pool->getConnection();
     umiEventFeedType::setConnection($connection);
     umiEventFeedUser::setConnection($connection);
     $user = $this->getUser();
     $settings = umiEventFeedType::getAllowedList($user->getSettings());
     $types = umiEventFeedType::getList();
     $result = array('nodes:type' => array());
     foreach ($types as $type) {
         $typeId = $type->getId();
         $result['nodes:type'][$typeId]['attribute:id'] = $typeId;
         $result['nodes:type'][$typeId]['attribute:name'] = getLabel($typeId);
         $result['nodes:type'][$typeId]['attribute:checked'] = in_array($typeId, $settings) ? 1 : 0;
     }
     return def_module::parseTemplate('', $result);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:21,代码来源:class.php


示例20: getUserSettings

 public function getUserSettings()
 {
     $vb10a8c0bede9eb4ea771b04db3149f28 = ConnectionPool::getInstance();
     $v4717d53ebfdfea8477f780ec66151dcb = $vb10a8c0bede9eb4ea771b04db3149f28->getConnection();
     umiEventFeedType::setConnection($v4717d53ebfdfea8477f780ec66151dcb);
     umiEventFeedUser::setConnection($v4717d53ebfdfea8477f780ec66151dcb);
     $vee11cbb19052e40b07aac0ca060c23ee = $this->getUser();
     $v2e5d8aa3dfa8ef34ca5131d20f9dad51 = umiEventFeedType::getAllowedList($vee11cbb19052e40b07aac0ca060c23ee->getSettings());
     $vd14a8022b085f9ef19d479cbdd581127 = umiEventFeedType::getList();
     $result = array('nodes:type' => array());
     foreach ($vd14a8022b085f9ef19d479cbdd581127 as $v599dcce2998a6b40b1e38e8c6006cb0a) {
         $v5f694956811487225d15e973ca38fbab = $v599dcce2998a6b40b1e38e8c6006cb0a->getId();
         $result['nodes:type'][$v5f694956811487225d15e973ca38fbab]['attribute:id'] = $v5f694956811487225d15e973ca38fbab;
         $result['nodes:type'][$v5f694956811487225d15e973ca38fbab]['attribute:name'] = getLabel($v5f694956811487225d15e973ca38fbab);
         $result['nodes:type'][$v5f694956811487225d15e973ca38fbab]['attribute:checked'] = in_array($v5f694956811487225d15e973ca38fbab, $v2e5d8aa3dfa8ef34ca5131d20f9dad51) ? 1 : 0;
     }
     return def_module::parseTemplate('', $result);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:18,代码来源:class.php



注:本文中的getLabel函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getLabelCounters函数代码示例发布时间:2022-05-15
下一篇:
PHP getKeyIgnoreCase函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap