本文整理汇总了PHP中getLabel函数的典型用法代码示例。如果您正苦于以下问题:PHP getLabel函数的具体用法?PHP getLabel怎么用?PHP getLabel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLabel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
}
示例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);
}
示例8: getItemLabel
function getItemLabel()
{
if (!$this->itemLbl) {
$this->itemLbl = getLabel($this->item, 'rule_action');
}
return $this->itemLbl;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}