当前位置: 首页>>代码示例>>PHP>>正文


PHP SPLoader::loadView方法代码示例

本文整理汇总了PHP中SPLoader::loadView方法的典型用法代码示例。如果您正苦于以下问题:PHP SPLoader::loadView方法的具体用法?PHP SPLoader::loadView怎么用?PHP SPLoader::loadView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SPLoader的用法示例。


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

示例1: defined

 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: http://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2014 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
 * @license GNU/GPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3
 * as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/gpl.html and http://sobipro.sigsiu.net/licenses.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * $Date: 2015-02-04 18:50:21 +0100 (Wed, 04 Feb 2015) $
 * $Revision: 49 $
 * $Author: szymon $
 */
defined('_JEXEC') || die('Direct Access to this location is not allowed.');
SPLoader::loadView('section');
/**
 * @author Radek Suski
 * @version 1.0
 * @created 04-Apr-2011 10:13:08
 */
class SPEntriesDJMTView extends SPSectionView
{
    public function getEntires()
    {
        $data = array();
        $entries = $this->get('entries');
        $params = $this->get('params');
        if (count($entries)) {
            $this->loadNonStaticData($entries);
            foreach ($entries as $eid) {
开发者ID:kidaa30,项目名称:lojinha,代码行数:31,代码来源:view.php

示例2: defined

 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: http://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and http://sobipro.sigsiu.net/licenses.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * $Date: 2015-02-19 13:24:35 +0100 (Thu, 19 Feb 2015) $
 * $Revision: 4387 $
 * $Author: Radek Suski $
 * $HeadURL: file:///opt/svn/SobiPro/Component/branches/SobiPro-1.1/Site/lib/views/view.php $
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('interface');
/**
 * @author Radek Suski
 * @version 1.0
 * @created 14-Jan-2009 2:44:34 PM
 */
abstract class SPFrontView extends SPObject implements SPView
{
    /**
     * @var array
     */
    protected $_attr = array();
    /**
     * @var array
     */
    protected $_config = array();
开发者ID:vstorm83,项目名称:propertease,代码行数:31,代码来源:view.php

示例3: defined

 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: http://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and http://sobipro.sigsiu.net/licenses.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * $Date: 2015-02-19 13:24:35 +0100 (Thu, 19 Feb 2015) $
 * $Revision: 4387 $
 * $Author: Radek Suski $
 * $HeadURL: file:///opt/svn/SobiPro/Component/branches/SobiPro-1.1/Site/lib/views/adm/field.php $
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('view', true);
/**
 * Design:
 * @author Radek Suski
 * @version 1.2
 * @created 10-Jan-2009 4:41:41 PM
 */
class SPFieldAdmView extends SPAdmView
{
    private $_templates = array();
    /**
     */
    public function display()
    {
        switch (trim($this->get('task'))) {
            case 'list':
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:field.php

示例4: defined

 * @package: SobiPro Library
 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: https://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('view');
/**
 * @author Radek Suski
 * @version 1.1
 * @created 10-Jan-2009 5:15:02 PM
 */
class SPEntryView extends SPFrontView implements SPView
{
    public function display()
    {
        $this->_task = $this->get('task');
        switch ($this->get('task')) {
            case 'edit':
            case 'add':
                $this->edit();
                break;
开发者ID:pelloq1,项目名称:SobiPro,代码行数:31,代码来源:entry.php

示例5: defined

 * @package: SobiPro Library
 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: https://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('config', true);
/**
 * @author Radek Suski
 * @version 1.0
 * @created 10-Jun-2010 17:09:48
 */
class SPAdmTemplateView extends SPConfigAdmView
{
    public function display()
    {
        switch ($this->get('task')) {
            case 'edit':
                $this->edit();
                break;
        }
        parent::display();
开发者ID:pelloq1,项目名称:SobiPro,代码行数:31,代码来源:template.php

示例6: details

 /**
  * Details view
  * @return void
  */
 private function details()
 {
     /* determine template package */
     $tplPackage = Sobi::Cfg('section.template', SPC::DEFAULT_TEMPLATE);
     /* load template config */
     $this->template();
     $this->tplCfg($tplPackage);
     if ($this->_model->get('oType') != 'entry') {
         Sobi::Error('Entry', sprintf('Serious security violation. Trying to save an object which claims to be an entry but it is a %s. Task was %s', $this->_model->get('oType'), SPRequest::task()), SPC::ERROR, 403, __LINE__, __FILE__);
         exit;
     }
     /* add pathway */
     SPFactory::mainframe()->addObjToPathway($this->_model);
     $this->_model->countVisit();
     $this->_model->loadFields(Sobi::Reg('current_section'));
     $class = SPLoader::loadView('entry');
     $view = new $class($this->template);
     $view->assign($this->_model, 'entry');
     $view->assign(SPFactory::user()->getCurrent(), 'visitor');
     $view->assign($this->_task, 'task');
     $view->setConfig($this->_tCfg, $this->template);
     $view->setTemplate($tplPackage . '.' . $this->templateType . '.' . $this->template);
     Sobi::Trigger($this->name(), __FUNCTION__, array(&$view));
     SPFactory::header()->objMeta($this->_model);
     $view->display();
     SPFactory::cache()->addObj($this->_model, 'entry', $this->_model->get('id'));
 }
开发者ID:pelloq1,项目名称:SobiPro,代码行数:31,代码来源:entry.php

示例7: chooser

 /**
  * Show category chooser
  *
  */
 protected function chooser($menu = false)
 {
     $out = SPRequest::cmd('out', null);
     $exp = SPRequest::int('expand', 0);
     $multi = SPRequest::int('multiple', 0);
     $tpl = SPRequest::word('treetpl', null);
     /* load the SigsiuTree class */
     $tree = SPLoader::loadClass('mlo.tree');
     $ordering = defined('SOBI_ADM_PATH') ? Sobi::GetUserState('categories.order', 'corder', 'position.asc') : Sobi::Cfg('list.categories_ordering');
     /* create new instance */
     $tree = new $tree($ordering);
     /* set link */
     if ($menu) {
         $tree->setId('menuTree');
         if (defined('SOBIPRO_ADM')) {
             $link = Sobi::Url(array('sid' => '{sid}'), false, false, true);
         } else {
             $link = Sobi::Url(array('sid' => '{sid}'));
         }
     } else {
         $link = "javascript:SP_selectCat( '{sid}' )";
     }
     $tree->setHref($link);
     /* set the task to expand the tree */
     $tree->setTask('category.chooser');
     /* disable the category which is currently edited - category cannot be within it self */
     if (!$multi) {
         if (SPRequest::sid() != Sobi::Section()) {
             $tree->disable(SPRequest::sid());
         }
         $tree->setPid(SPRequest::sid());
     } else {
         $tree->disable(Sobi::Reg('current_section'));
     }
     /* case we extending existing tree */
     if ($out == 'xml' && $exp) {
         $pid = SPRequest::int('pid', 0);
         $pid = $pid ? $pid : SPRequest::sid();
         $tree->setPid($pid);
         $tree->disable($pid);
         $tree->extend($exp);
     } else {
         /* init the tree for the current section */
         $tree->init(Sobi::Reg('current_section'));
         /* load model */
         if (!$this->_model) {
             $this->setModel(SPLoader::loadModel('category'));
         }
         /* create new view */
         $class = SPLoader::loadView('category');
         $view = new $class();
         /* assign the task and the tree */
         $view->assign($this->_task, 'task');
         $view->assign($tree, 'tree');
         $view->assign($this->_model, 'category');
         /* select template to show */
         if ($tpl) {
             $view->setTemplate('category.' . $tpl);
         } elseif ($multi) {
             $view->setTemplate('category.mchooser');
         } else {
             $view->setTemplate('category.chooser');
         }
         Sobi::Trigger('Category', 'ChooserView', array(&$view));
         $view->chooser();
     }
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:71,代码来源:category.php

示例8: defined

 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: http://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and http://sobipro.sigsiu.net/licenses.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * $Date: 2015-02-19 13:24:35 +0100 (Thu, 19 Feb 2015) $
 * $Revision: 4387 $
 * $Author: Radek Suski $
 * $HeadURL: file:///opt/svn/SobiPro/Component/branches/SobiPro-1.1/Site/lib/views/adm/category.php $
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('section', true);
/**
 * @author Radek Suski
 * @version 1.0
 * @created 10-Jan-2009 4:42:13 PM
 */
class SPCategoryAdmView extends SPSectionAdmView
{
    /**
     * @param string $title
     * @return string
     */
    public function setTitle($title)
    {
        $name = $this->get('category.name');
        Sobi::Trigger('setTitle', $this->name(), array(&$title));
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:31,代码来源:category.php


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