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

PHP SPLang类代码示例

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

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



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

示例1: save

 public function save(&$attr)
 {
     parent::save($attr);
     if ($attr['method'] == 'fixed') {
         if (!$attr['fixedCid']) {
             throw new SPException(SPLang::e('FIELD_FIXED_CID_MISSING'));
         } else {
             $cids = explode(',', $attr['fixedCid']);
             if (count($cids)) {
                 foreach ($cids as $cid) {
                     $catId = (int) $cid;
                     if (!$catId) {
                         throw new SPException(SPLang::e('FIELD_FIXED_CID_INVALID', $cid));
                     }
                     if ($catId == Sobi::Section()) {
                         throw new SPException(SPLang::e('FIELD_FIXED_CID_INVALID', $cid));
                     } else {
                         $parents = SPFactory::config()->getParentPath($catId);
                         if (!isset($parents[0]) || $parents[0] != Sobi::Section()) {
                             throw new SPException(SPLang::e('FIELD_FIXED_CID_INVALID_SECTION', $catId));
                         }
                     }
                 }
             } else {
                 throw new SPException(SPLang::e('FIELD_FIXED_CID_MISSING'));
             }
         }
     }
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:29,代码来源:category.php


示例2: execute

 /**
  */
 public function execute()
 {
     $r = false;
     switch ($this->_task) {
         case 'chooser':
         case 'expand':
             SPLoader::loadClass('html.input');
             $r = true;
             $this->chooser($this->_task == 'expand');
             break;
         case 'parents':
             $r = true;
             $this->parents();
             break;
         case 'icon':
             $r = true;
             $this->iconChooser();
             break;
         default:
             /* case parent didn't registered this task, it was an error */
             if (!parent::execute() && $this->name() == __CLASS__) {
                 Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
             } else {
                 $r = true;
             }
             break;
     }
     return $r;
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:category.php


示例3: save

 public function save(&$attr)
 {
     if (($attr['resize'] || $attr['crop']) && !($attr['resizeWidth'] && $attr['resizeHeight'])) {
         throw new SPException(SPLang::e('IMG_FIELD_RESIZE_NO_SIZE'));
     }
     parent::save($attr);
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:7,代码来源:image.php


示例4: display

 public function display()
 {
     $template = SPLoader::loadTemplate($this->_tpl, 'php');
     if ($template) {
         include $template;
     } else {
         throw new SPException(SPLang::e('CANNOT_LOAD_TEMPLATE_FILE_AT', SPLoader::loadTemplate($this->_tpl, 'php', false)));
     }
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:9,代码来源:template_php.php


示例5: screen

 private function screen()
 {
     $bankData = SPLang::getValue('bankdata', 'application', Sobi::Section());
     if (!strlen($bankData)) {
         SPLang::getValue('bankdata', 'application');
     }
     $tile = Sobi::Txt('APP.BANK_TRANSFER_NAME');
     $this->getView('bank_transfer')->assign($tile, 'title')->assign($bankData, 'bankdata')->determineTemplate('extensions', 'bank-transfer')->display();
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:9,代码来源:bank_transfer.php


示例6: check

 protected function check($file)
 {
     $allowed = SPLoader::loadIniFile('etc.files');
     $mType = SPFactory::Instance('services.fileinfo', $file)->mimeType();
     if (strlen($mType) && !in_array($mType, $allowed)) {
         SPFs::delete($file);
         $this->message(array('type' => 'error', 'text' => SPLang::e('FILE_WRONG_TYPE', $mType), 'id' => ''));
     }
     return $mType;
 }
开发者ID:pelloq1,项目名称:SobiPro,代码行数:10,代码来源:file.php


示例7: save

 public function save(&$attr)
 {
     $data = array('key' => $this->nid . '-viewInfo', 'value' => $attr['viewInfo'], 'type' => 'field_information', 'fid' => $this->fid, 'id' => Sobi::Section(), 'section' => Sobi::Section());
     SPLang::saveValues($data);
     $data = array('key' => $this->nid . '-entryInfo', 'value' => $attr['entryInfo'], 'type' => 'field_information', 'fid' => $this->fid, 'id' => Sobi::Section(), 'section' => Sobi::Section());
     SPLang::saveValues($data);
     $attr['required'] = 0;
     $attr['fee'] = 0;
     $attr['isFree'] = 1;
     parent::save($attr);
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:11,代码来源:info.php


示例8: search

 protected function search()
 {
     if (!SPFactory::mainframe()->checkToken()) {
         Sobi::Error('Token', SPLang::e('UNAUTHORIZED_ACCESS_TASK', SPRequest::task()), SPC::ERROR, 403, __LINE__, __FILE__);
     }
     //		$selected = SPRequest::int( 'selected', 0 );
     $ssid = SPRequest::base64('ssid');
     $query = SPRequest::string('q', null);
     $session = SPFactory::user()->getUserState('userSelector', null, array());
     $setting = $session[$ssid];
     /* get the site to display */
     $site = SPRequest::int('site', 1);
     $eLim = Sobi::Cfg('user_selector.entries_limit', 18);
     $eLimStart = ($site - 1) * $eLim;
     $params = array();
     if ($query) {
         $q = '%' . $query . '%';
         $params = SPFactory::db()->where(array('name' => $q, 'username' => $q, 'email' => $q), 'OR');
     }
     try {
         $count = SPFactory::db()->select('COUNT(*)', '#__users', $params, $setting['ordering'])->loadResult();
         $data = SPFactory::db()->select(array('id', 'name', 'username', 'email', 'registerDate', 'lastvisitDate'), '#__users', $params, $setting['ordering'], $eLim, $eLimStart)->loadAssocList();
     } catch (SPException $x) {
         echo $x->getMessage();
         exit;
     }
     $response = array('sites' => ceil($count / $eLim), 'site' => $site);
     if (count($data)) {
         $replacements = array();
         preg_match_all('/\\%[a-z]*/', $setting['format'], $replacements);
         $placeholders = array();
         if (isset($replacements[0]) && count($replacements[0])) {
             foreach ($replacements[0] as $placeholder) {
                 $placeholders[] = str_replace('%', null, $placeholder);
             }
         }
         if (count($replacements)) {
             foreach ($data as $index => $user) {
                 $txt = $setting['format'];
                 foreach ($placeholders as $attribute) {
                     if (isset($user[$attribute])) {
                         $txt = str_replace('%' . $attribute, $user[$attribute], $txt);
                     }
                 }
                 $data[$index]['text'] = $txt;
             }
         }
         $response['users'] = $data;
     }
     SPFactory::mainframe()->cleanBuffer();
     echo json_encode($response);
     exit;
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:53,代码来源:user.php


示例9: display

 /**
  * @return string
  */
 public function display()
 {
     $this->_view[] = "\n <!-- Sobi Pro - admin side menu start -->";
     $this->_view[] = "\n<div id=\"SPaccordionTabs\" class=\"SPmenuTabs\">";
     $this->_view[] = '<div id="SPMenuCtrl">';
     $this->_view[] = ' <button class="btn btn-mini btn-sobipro" id="SPMenuCtrlBt" type="button">-</button>';
     $this->_view[] = '</div>';
     $media = Sobi::Cfg('img_folder_live');
     $this->_view[] = "\n<div class='well well-small'><a href=\"http://www.Sigsiu.NET\" target=\"_blank\" title=\"Sigsiu.NET Software Development\"><img src=\"{$media}/sp.png\" alt=\"Sigsiu.NET Software Development\" style=\"border-style:none;\" /></a></div>\n";
     $fs = null;
     if (count($this->_sections)) {
         if ($this->_task == 'section.view') {
             //				$this->_task = 'section.entries';
             $this->_open = 'AMN.ENT_CAT';
         }
         $this->_view[] = '<div class="accordion" id="SpMenu">';
         foreach ($this->_sections as $section => $list) {
             $sid = SPLang::nid($section);
             $in = false;
             if (!$fs) {
                 $fs = $sid;
             }
             if (!$this->_open && array_key_exists($this->_task, $list)) {
                 $this->_open = $sid;
                 $in = ' in';
             }
             if ($this->_open && $section == $this->_open) {
                 $in = ' in';
             }
             if (!$this->_open && array_key_exists($this->_task, $list)) {
                 $in = ' in';
             }
             $this->_view[] = '<div class="accordion-group">';
             $this->_view[] = '<div class="accordion-heading">';
             $this->_view[] = '<a class="accordion-toggle" data-toggle="collapse" data-parent="#SpMenu" href="#' . $sid . '">';
             $this->_view[] = Sobi::Txt($section);
             $this->_view[] = '</a>';
             $this->_view[] = '</div>';
             $this->_view[] = '<div id="' . $sid . '" class="accordion-body collapse' . $in . '">';
             $this->_view[] = '<div class="accordion-inner">';
             $this->_view[] = $this->section($list, $section);
             $this->_view[] = '</div>';
             $this->_view[] = '</div>';
             $this->_view[] = '</div>';
         }
         $this->_view[] = '</div>';
     }
     $this->_view[] = "\n</div>\n";
     $this->_view[] = '<div class="brand" style="display: inherit;">© <a href="http://www.sigsiu.net">Sigsiu.NET GmbH</a></div>';
     $this->_view[] = "\n<!-- Sobi Pro - admin side menu end -->\n";
     return implode("\n", $this->_view);
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:55,代码来源:menu.php


示例10: screen

 private function screen()
 {
     $data = SPFactory::registry()->loadDBSection('paypal_' . Sobi::Section())->get('paypal_' . Sobi::Section());
     if (!count($data)) {
         $data = SPFactory::registry()->loadDBSection('paypal')->get('paypal');
     }
     $ppexpl = SPLang::getValue('ppexpl', 'application', Sobi::Section());
     $ppsubj = SPLang::getValue('ppsubject', 'application', Sobi::Section());
     if (!strlen($ppsubj)) {
         $ppsubj = SPLang::getValue('ppsubject', 'application');
     }
     $this->getView('paypal')->assign($tile, 'title')->assign($data['ppurl']['value'], 'ppurl')->assign($data['ppemail']['value'], 'ppemail')->assign($data['pprurl']['value'], 'pprurl')->assign($data['ppcc']['value'], 'ppcc')->assign($ppexpl, 'ppexpl')->assign($ppsubj, 'ppsubject')->determineTemplate('extensions', 'paypal')->display();
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:13,代码来源:paypal.php


示例11: struct

 /**
  * @return array
  * Ausgabe des Feldes in DV and vCard
  */
 public function struct()
 {
     $data = SPLang::getValue($this->nid . '-viewInfo', 'field_information', Sobi::Section());
     $attributes = array();
     if (strlen($data)) {
         $this->cssClass = strlen($this->cssClass) ? $this->cssClass : 'spFieldsData';
         $this->cssClass = $this->cssClass . ' ' . $this->nid;
         $this->cleanCss();
         $attributes = array('lang' => Sobi::Lang(), 'class' => $this->cssClass);
     } else {
         $this->cssClass = strlen($this->cssClass) ? $this->cssClass : 'spField';
     }
     return array('_complex' => 1, '_data' => $data, '_attributes' => $attributes);
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:18,代码来源:info.php


示例12: getFunctionsLabel

 protected function getFunctionsLabel()
 {
     if (isset($this->params->interpreter)) {
         $interpreter = explode('.', $this->params->interpreter);
         $function = array_pop($interpreter);
         $obj = SPFactory::Instance(implode('.', $interpreter));
         self::$functionsLabel = $obj->{$function}(self::$sid, self::$section);
     } elseif (isset($this->params->text)) {
         if (isset($this->params->loadTextFile)) {
             SPLang::load($this->params->loadTextFile);
         }
         self::$functionsLabel = Sobi::Txt($this->params->text);
     }
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:14,代码来源:native.php


示例13: js

 protected function js()
 {
     $lang = SPLang::jsLang(true);
     if (count($lang)) {
         foreach ($lang as $term => $text) {
             unset($lang[$term]);
             $term = str_replace('SP.JS_', null, $term);
             $lang[$term] = $text;
         }
     }
     if (!SPRequest::int('deb')) {
         SPFactory::mainframe()->cleanBuffer();
         header('Content-type: text/javascript');
     }
     echo 'SobiPro.setLang( ' . json_encode($lang) . ' );';
     exit;
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:17,代码来源:txt.php


示例14: saveAttr

 /**
  * @param $attr
  * @return mixed
  * @throws SPException
  */
 protected function saveAttr(&$attr)
 {
     if ($this->nid) {
         $this->nid = $attr['nid'];
     }
     if (!isset($attr['viewInfo'])) {
         $attr['viewInfo'] = $this->viewInfo;
         $attr['entryInfo'] = $this->entryInfo;
     }
     $data = array('key' => $this->nid . '-viewInfo', 'value' => $attr['viewInfo'], 'type' => 'field_information', 'fid' => $this->fid, 'id' => Sobi::Section(), 'section' => Sobi::Section());
     SPLang::saveValues($data);
     $data = array('key' => $this->nid . '-entryInfo', 'value' => $attr['entryInfo'], 'type' => 'field_information', 'fid' => $this->fid, 'id' => Sobi::Section(), 'section' => Sobi::Section());
     SPLang::saveValues($data);
     $attr['required'] = 0;
     $attr['fee'] = 0;
     $attr['isFree'] = 1;
     return $attr;
 }
开发者ID:pelloq1,项目名称:SobiPro,代码行数:23,代码来源:info.php


示例15: screen

 private function screen()
 {
     $view =& SPFactory::View('view', true);
     $view->setTemplate('config.help');
     if (SPLoader::path('etc.repos.sobipro_core.repository', 'front', true, 'xml')) {
         $repository = SPFactory::Instance('services.installers.repository');
         $repository->loadDefinition(SPLoader::path("etc.repos.sobipro_core.repository", 'front', true, 'xml'));
         try {
             $repository->connect();
         } catch (SPException $x) {
             $view->assign(SPLang::e('REPO_ERR', $x->getMessage()), 'message');
         }
         try {
             $response = $repository->help($repository->get('token'), SPRequest::cmd('mid'));
             $view->assign($response, 'message');
         } catch (SPException $x) {
             $view->assign(SPLang::e('REPO_ERR', $x->getMessage()), 'message');
         }
     } else {
         $view->assign(Sobi::Txt('MSG.HELP_ADD_CORE_REPO'), 'message');
     }
     $view->display();
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:23,代码来源:help.php


示例16: execute

 /**
  */
 public function execute()
 {
     /* parent class executes the plugins */
     SPRequest::set('task', $this->_type . '.' . $this->_task);
     switch ($this->_task) {
         case 'front':
             $this->getSections();
             /** @var $view SPAdmPanelView */
             $view = SPFactory::View('front');
             /* load template config */
             //				$this->tplCfg( 'front' );
             //				$view->setConfig( $this->_tCfg, 'general' );
             $view->determineTemplate('front', SPC::DEFAULT_TEMPLATE);
             $view->assign($this->_sections, 'sections');
             $view->display();
             break;
         default:
             /* case parents or plugin didn't registered this task, it was an error */
             if (!parent::execute()) {
                 Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
             }
             break;
     }
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:26,代码来源:front.php


示例17: execute

 public function execute()
 {
     SPRequest::set('task', $this->_type . '.' . $this->_task);
     if (strstr($this->_task, '.')) {
         $task = explode('.', $this->_task);
         $class = SPLoader::loadClass('opt.listing.' . $task[0], false, null, true);
     } else {
         $class = SPLoader::loadClass('opt.listing.' . $this->_task, false, null, true);
     }
     if ($class) {
         $imp = class_implements($class);
         if (is_array($imp) && in_array('SPListing', $imp)) {
             /** @noinspection PhpIncludeInspection $compatibility */
             $listing = new $class();
             if (!isset($class::$compatibility)) {
                 define('SOBI_LEGACY_LISTING', true);
                 if (strstr($this->_task, '.')) {
                     $t = explode('.', $this->_task);
                     $listing->setTask($t[0]);
                 } else {
                     $listing->setTask($this->_task);
                 }
             } else {
                 $listing->setTask($this->_task);
             }
             return $listing->execute();
         } else {
             Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND Wrong class definition', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
         }
     } else {
         /* case parent didn't registered this task, it was an error */
         if (!parent::execute() && $this->name() == __CLASS__) {
             Sobi::Error($this->name(), SPLang::e('SUCH_TASK_NOT_FOUND', SPRequest::task()), SPC::NOTICE, 404, __LINE__, __FILE__);
         }
     }
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:36,代码来源:listing.php


示例18: save

 public function save(&$attr)
 {
     static $lang = null;
     static $defLang = null;
     if (!$lang) {
         $lang = Sobi::Lang();
         $defLang = Sobi::DefLang();
     }
     $file = SPRequest::file('spfieldsopts', 'tmp_name');
     if ($file) {
         $data = parse_ini_file($file, true);
     } elseif (is_string($attr['options'])) {
         $data = parse_ini_string($attr['options'], true);
     } else {
         $data = null;
     }
     $options = $this->parseOptsFile($data);
     if (!count($options) && count($attr['options'])) {
         $p = 0;
         $hold = array();
         foreach ($attr['options'] as $o) {
             if (is_numeric($o['id'])) {
                 $o['id'] = $this->nid . '_' . $o['id'];
             }
             if (isset($o['id'])) {
                 $i = 0;
                 $oid = $o['id'];
                 while (isset($hold[$oid])) {
                     $oid = $o['id'] . '_' . ++$i;
                 }
                 $options[] = array('id' => $oid, 'name' => $o['name'], 'parent' => null, 'position' => ++$p);
                 $hold[$oid] = $oid;
             }
         }
     }
     if (count($options)) {
         unset($attr['options']);
         $optionsArr = array();
         $labelsArr = array();
         $defLabelsArr = array();
         $optsIds = array();
         foreach ($options as $i => $option) {
             /* check for doubles */
             foreach ($options as $pos => $opt) {
                 if ($i == $pos) {
                     continue;
                 }
                 if ($option['id'] == $opt['id']) {
                     $option['id'] = $option['id'] . '_' . substr((string) microtime(), 2, 8) . rand(1, 100);
                     SPFactory::message()->warning('FIELD_WARN_DUPLICATE_OPT_ID');
                 }
             }
             $optionsArr[] = array('fid' => $this->id, 'optValue' => $option['id'], 'optPos' => $option['position'], 'optParent' => $option['parent']);
             $defLabelsArr[] = array('sKey' => $option['id'], 'sValue' => $option['name'], 'language' => $defLang, 'oType' => 'field_option', 'fid' => $this->id);
             $labelsArr[] = array('sKey' => $option['id'], 'sValue' => $option['name'], 'language' => $lang, 'oType' => 'field_option', 'fid' => $this->id);
             $optsIds[] = $option['id'];
         }
         /* @var SPdb $db */
         $db =& SPFactory::db();
         /* try to delete the existing labels */
         try {
             $db->delete('spdb_field_option', array('fid' => $this->id));
             $db->delete('spdb_language', array('oType' => 'field_option', 'fid' => $this->id, '!sKey' => $optsIds));
         } catch (SPException $x) {
             Sobi::Error($this->name(), SPLang::e('CANNOT_DELETE_SELECTED_OPTIONS', $x->getMessage()), SPC::ERROR, 500, __LINE__, __FILE__);
         }
         /* insert new values */
         try {
             $db->insertArray('spdb_field_option', $optionsArr);
             $db->insertArray('spdb_language', $labelsArr, true);
             if ($defLang != $lang) {
                 $db->insertArray('spdb_language', $defLabelsArr, false, true);
             }
         } catch (SPException $x) {
             Sobi::Error($this->name(), SPLang::e('CANNOT_STORE_FIELD_OPTIONS_DB_ERR', $x->getMessage()), SPC::ERROR, 500, __LINE__, __FILE__);
         }
     }
     if (!isset($attr['params'])) {
         $attr['params'] = array();
     }
     $myAttr = $this->getAttr();
     $properties = array();
     if (count($myAttr)) {
         foreach ($myAttr as $property) {
             $properties[$property] = isset($attr[$property]) ? $attr[$property] : null;
         }
     }
     $attr['params'] = $properties;
     $this->sets['field.options'] = SPFactory::Instance('types.array')->toINIString($data);
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:90,代码来源:chbxgroup.php


示例19: view

 protected function view()
 {
     /* determine template package */
     $tplPackage = Sobi::Cfg('section.template', SPC::DEFAULT_TEMPLATE);
     Sobi::ReturnPoint();
     $this->_task = 'user';
     if (!$this->_model) {
         $this->setModel('section');
         $this->_model->init(Sobi::Section());
     }
     $this->visible();
     /* load template config */
     $this->template();
     $this->tplCfg($tplPackage);
     /* get limits - if defined in template config - otherwise from the section config */
     $eLimit = $this->tKey($this->template, 'entries_limit', Sobi::Cfg('list.entries_limit', 2));
     $eInLine = $this->tKey($this->template, 'entries_in_line', Sobi::Cfg('list.entries_in_line', 2));
     $url = array('sid' => SPRequest::sid(), 'task' => 'list.user');
     if (SPRequest::int('uid')) {
         $url['uid'] = SPRequest::int('uid');
         $this->uid = (int) SPRequest::int('uid');
     } else {
         $this->uid = (int) Sobi::My('id');
     }
     $this->user = SPJoomlaUser::getBaseData((int) $this->uid);
     if (!$this->user) {
         throw new SPException(SPLang::e('UNAUTHORIZED_ACCESS'));
     }
     /* get the site to display */
     $site = SPRequest::int('site', 1);
     $eLimStart = ($site - 1) * $eLimit;
     $eOrder = $this->parseOrdering('entries', 'eorder', $this->tKey($this->template, 'entries_ordering', Sobi::Cfg('list.entries_ordering', 'name.asc')));
     $eCount = count($this->getEntries($eOrder, 0, 0, true, array('spo.owner' => $this->uid), true, Sobi::Section()));
     $entries = $this->getEntries($eOrder, $eLimit, $eLimStart, true, array('spo.owner' => $this->uid), true, Sobi::Section());
     //		$eCount = count( $this->_getEntries( 0, 0, true ) );
     //		$entries = $this->_getEntries( $eLimit, $site );
     $pn = SPFactory::Instance('helpers.pagenav_' . $this->tKey($this->template, 'template_type', 'xslt'), $eLimit, $eCount, $site, $url);
     if (SPRequest::int('site', 0)) {
         $url['site'] = SPRequest::int('site', 0);
     }
     SPFactory::header()->addCanonical(Sobi::Url($url, true, true, true));
     /* handle meta data */
     SPFactory::header()->objMeta($this->_model);
     SPFactory::mainframe()->addToPathway(Sobi::Txt('UL.PATH_TITLE', array('username' => $this->user->username, 'user' => $this->user->name)), Sobi::Url('current'));
     SPFactory::header()->addTitle(Sobi::Txt('UL.TITLE', array('username' => $this->user->username, 'user' => $this->user->name, 'section' => $this->_model->get('name'))), array(ceil($eCount / $eLimit), $site));
     /* add pathway */
     /* get view class */
     $view = SPFactory::View('listing');
     $view->assign($eLimit, '$eLimit');
     $view->assign($eLimStart, '$eLimStart');
     $view->assign($eCount, '$eCount');
     $view->assign($eInLine, '$eInLine');
     $view->assign($this->_task, 'task');
     $view->assign($this->_model, 'section');
     $view->setConfig($this->_tCfg, $this->template);
     $view->setTemplate($tplPackage . '.' . $this->templateType . '.' . $this->template);
     $view->assign($pn->get(), 'navigation');
     $view->assign(SPFactory::user()->getCurrent(), 'visitor');
     $view->assign($entries, 'entries');
     Sobi::Trigger('UserListing', 'View', array(&$view));
     $view->display();
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:62,代码来源:user.php


示例20: struct

 /**
  * @return array
  */
 public function struct()
 {
     $baseData = $this->getRaw();
     $list = array();
     $struct = array();
     $order = SPFactory::cache()->getVar('order_' . $this->nid);
     if (!$order) {
         $order = SPFactory::db()->select('optValue', 'spdb_field_option', array('fid' => $this->id), 'optPos')->loadResultArray();
         SPFactory::cache()->addVar($order, 'order_' . $this->nid);
     }
     if (is_array($baseData) && count($baseData)) {
         $this->cssClass = strlen($this->cssClass) ? $this->cssClass : 'spFieldsData';
         $this->cssClass = $this->cssClass . ' ' . $this->nid;
         $this->cleanCss();
         foreach ($order as $opt) {
             if (isset($baseData[$opt])) {
                 $list[] = array('_tag' => 'li', '_value' => SPLang::clean($baseData[$opt]), '_class' => $opt);
             }
         }
         foreach ($this->options as $opt) {
             $struct[] = array('_complex' => 1, '_data' => $opt['label'], '_attributes' => array('selected' => isset($baseData[$opt['id']]) ? 'true' : 'false', 'id' => $opt['id'], 'position' => $opt['position']));
         }
         $data = array('ul' => array('_complex' => 1, '_data' => $list, '_attributes' => array('class' => $this->cssClass)));
     }
     if (count($list)) {
         return array('_complex' => 1, '_data' => $data, '_attributes' => array('lang' => $this->lang, 'class' => $this->cssClass), '_options' => $struct);
     }
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:31,代码来源:chbxgroup.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP SPLoader类代码示例发布时间:2022-05-23
下一篇:
PHP SPFactory类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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