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


PHP JViewLegacy类代码示例

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


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

示例1: assignExtrasView

 protected function assignExtrasView()
 {
     // Create the View
     $view = new JViewLegacy(array('name' => 'extras', 'base_path' => JPATH_SITE . '/components/com_rsmembership'));
     // Create the Model
     $model = JModelLegacy::getInstance('Extras', 'RSMembershipModel');
     // Assign the Model to the View and set it as default.
     $view->setModel($model, true);
     $view->model =& $model;
     $view->item = $this->membership;
     $view->extras = $model->getItems();
     $view->show_subscribe_btn = false;
     $this->extrasview = $view->loadTemplate();
 }
开发者ID:JozefAB,项目名称:qk,代码行数:14,代码来源:view.html.php

示例2: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a Error object.
  *
  * @see     JViewLegacy::loadTemplate()
  * @since   12.2
  */
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     /** @var $app JApplicationSite */
     $this->layout = $this->getLayout();
     switch ($this->layout) {
         case "contact":
             $this->prepareContact();
             break;
         case "social":
             $this->prepareSocialProfiles();
             break;
         default:
             // Basic data for the profile.
             $this->prepareBasic();
             break;
     }
     $userId = JFactory::getUser()->id;
     if (!$userId) {
         $app->enqueueMessage(JText::_("COM_SOCIALCOMMUNITY_ERROR_NOT_LOG_IN"), "notice");
         $app->redirect(JRoute::_('index.php?option=com_users&view=login', false));
         return;
     }
     // Prepare layout data.
     $this->layoutData = new JData();
     $this->layoutData->layout = $this->layout;
     $this->prepareDocument();
     parent::display($tpl);
 }
开发者ID:pashakiz,项目名称:crowdf,代码行数:39,代码来源:view.html.php

示例3: display

 /**
  * Generates a list of JSON items.
  *
  * @return    void
  */
 public function display($tpl = null)
 {
     $model = $this->getModel();
     $this->item = $this->get('Item');
     $this->component = $model->getState($model->getName() . '.component');
     $this->section = $model->getState($model->getName() . '.section');
     $this->asset_id = $model->getState($model->getName() . '.asset_id');
     $this->project_id = $model->getState($model->getName() . '.project_id');
     $this->inherit = $model->getState($model->getName() . '.inherit');
     if (!$this->asset_id && $this->inherit) {
         $this->asset_id = $this->getComponentProjectAssetId($this->component, $this->project_id);
     }
     $this->rules = $this->getAssetRules();
     $this->public_groups = array('1', JComponentHelper::getParams('com_users')->get('guest_usergroup', 1));
     $user = JFactory::getUser();
     if (!$user->authorise('core.admin', $this->component) && !$user->authorise('core.manage', $this->component)) {
         JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR'));
         return false;
     }
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseWarning(500, implode("\n", $errors));
         return false;
     }
     parent::display($tpl);
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:31,代码来源:view.raw.php

示例4: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed   A string if successful, otherwise a Error object.
  */
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Preprocess the list of items to find ordering divisions.
     foreach ($this->items as &$item) {
         $this->ordering[$item->parent_id][] = $item->id;
     }
     // Levels filter.
     $options = array();
     $options[] = JHtml::_('select.option', '1', JText::_('J1'));
     $options[] = JHtml::_('select.option', '2', JText::_('J2'));
     $options[] = JHtml::_('select.option', '3', JText::_('J3'));
     $options[] = JHtml::_('select.option', '4', JText::_('J4'));
     $options[] = JHtml::_('select.option', '5', JText::_('J5'));
     $options[] = JHtml::_('select.option', '6', JText::_('J6'));
     $options[] = JHtml::_('select.option', '7', JText::_('J7'));
     $options[] = JHtml::_('select.option', '8', JText::_('J8'));
     $options[] = JHtml::_('select.option', '9', JText::_('J9'));
     $options[] = JHtml::_('select.option', '10', JText::_('J10'));
     $this->f_levels = $options;
     // We don't need toolbar in the modal window.
     if ($this->getLayout() !== 'modal') {
         $this->addToolbar();
     }
     parent::display($tpl);
 }
开发者ID:SysBind,项目名称:joomla-cms,代码行数:42,代码来源:view.html.php

示例5: display

 /**
  * sauto view display method.
  *
  * @param string $tpl The name of the template file to parse;
  *
  * @return void
  */
 public function display($tpl = null)
 {
     $app =& JFactory::getApplication();
     $link_redirect = JRoute::_('index.php?option=com_sauto');
     $user =& JFactory::getUser();
     $uid = $user->id;
     if ($uid == 0) {
         //vizitator
         $app->redirect($link_redirect, JText::_('SAUTO_PAGE_NOT_EXIST'));
     } else {
         $db = JFactory::getDbo();
         $query = "SELECT `tip_cont` FROM #__sa_profiles WHERE `uid` = '" . $uid . "'";
         $db->setQuery($query);
         $type = $db->loadResult();
         if ($type == 0) {
             //cont customer
             $tpl = '0';
         } elseif ($type == 1) {
             //cont dealer
             $tpl = '1';
         } else {
             $app->redirect($link_redirect, JText::_('SAUTO_PAGE_NOT_EXIST'));
         }
         parent::display($tpl);
     }
 }
开发者ID:grchis,项目名称:Site-Auto,代码行数:33,代码来源:view.html.php

示例6: display

 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $pathway = $app->getPathWay();
     $menus = $app->getMenu();
     $menu = $menus->getActive();
     $params = $app->getParams();
     $this->assignRef('params', $params);
     $id = $params->get('course_id');
     if (!$id) {
         $id = JRequest::getVar('course_id');
     }
     $id = (int) $id;
     if (!$id) {
         echo JText::_('COM_JOOMDLE_NO_COURSE_SELECTED');
         return;
     }
     $this->course_info = JoomdleHelperContent::getCourseInfo($id);
     $this->student_no = JoomdleHelperContent::getCourseStudentsNo($id);
     $this->assignments = JoomdleHelperContent::getAssignmentSubmissions($id);
     $this->grades = JoomdleHelperContent::getAssignmentGrades($id);
     $this->daily_stats = JoomdleHelperContent::getCourseDailyStats($id);
     if (is_object($menu) && $menu->query['view'] != 'coursestats') {
         $pathway->addItem($this->course_info['fullname'], '');
     }
     $document = JFactory::getDocument();
     $document->setTitle($this->course_info['fullname'] . ': ' . JText::_('COM_JOOMDLE_STATS'));
     parent::display($tpl);
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:29,代码来源:view.html.php

示例7: display

 function display($tpl = null)
 {
     $entry = $this->get('Data');
     $characters_length = $this->get('CharactersLength');
     $robots_array = array('', 'index, follow', 'noindex, follow', 'index, nofollow', 'noindex, nofollow');
     if (empty($entry->id)) {
         JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_NEWENTRY'), 'easyfrontendseo-add');
         JToolBarHelper::save('save');
         JToolBarHelper::cancel('cancel');
     } else {
         JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_EDITENTRY'), 'easyfrontendseo-edit');
         JToolbarHelper::apply('apply');
         JToolBarHelper::save('save');
         JToolBarHelper::cancel('cancel', 'Close');
     }
     JHTML::_('behavior.framework');
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_easyfrontendseo/css/easyfrontendseo.css');
     $document->addScript('components/com_easyfrontendseo/js/wordcount.js', 'text/javascript');
     $output = "window.addEvent('domready', function(){";
     $output .= "new WordCount('counter_title', {inputName:'title', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_title', {inputName:'title', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_description', {inputName:'description', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_description', {inputName:'description', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_keywords', {inputName:'keywords', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_keywords', {inputName:'keywords', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= "new WordCount('counter_generator', {inputName:'generator', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_generator', {inputName:'generator', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
     $output .= " });";
     $document->addScriptDeclaration($output, 'text/javascript');
     $this->entry = $entry;
     $this->characters_length = $characters_length;
     $this->robots_array = $robots_array;
     // Get donation code message
     require_once JPATH_COMPONENT . '/helpers/easyfrontendseo.php';
     $donation_code_message = EasyFrontendSeoHelper::getDonationCodeMessage();
     $this->donation_code_message = $donation_code_message;
     parent::display($tpl);
 }
开发者ID:kJluk,项目名称:EFSEO-Easy-Frontend-SEO,代码行数:35,代码来源:view.html.php

示例8: display

 function display($tpl = null)
 {
     $lists = array();
     $condition = $this->get('condition');
     $optionFields = $this->get('optionFields');
     $allFields = $this->get('allFields');
     foreach ($allFields as $field) {
         foreach ($optionFields as $i => $optionField) {
             if ($field->ComponentId == $optionField->ComponentId) {
                 $optionField->ComponentName = $field->PropertyValue;
                 $optionFields[$i] = $optionField;
                 break;
             }
         }
     }
     $actions = array(JHTML::_('select.option', 'show', JText::_('RSFP_CONDITION_SHOW')), JHTML::_('select.option', 'hide', JText::_('RSFP_CONDITION_HIDE')));
     $lists['action'] = JHTML::_('select.genericlist', $actions, 'action', '', 'value', 'text', $condition->action);
     $blocks = array(JHTML::_('select.option', 1, JText::_('RSFP_CONDITION_BLOCK')), JHTML::_('select.option', 0, JText::_('RSFP_CONDITION_FIELD')));
     $lists['block'] = JHTML::_('select.genericlist', $blocks, 'block', '', 'value', 'text', $condition->block);
     $conditions = array(JHTML::_('select.option', 'all', JText::_('RSFP_CONDITION_ALL')), JHTML::_('select.option', 'any', JText::_('RSFP_CONDITION_ANY')));
     $lists['condition'] = JHTML::_('select.genericlist', $conditions, 'condition', '', 'value', 'text', $condition->condition);
     $operators = array(JHTML::_('select.option', 'is', JText::_('RSFP_CONDITION_IS')), JHTML::_('select.option', 'is_not', JText::_('RSFP_CONDITION_IS_NOT')));
     $lists['allfields'] = JHTML::_('select.genericlist', $allFields, 'component_id', '', 'ComponentId', 'PropertyValue', $condition->component_id);
     $this->lang = $this->get('lang');
     $this->operators = $operators;
     $this->allFields = $allFields;
     $this->optionFields = $optionFields;
     $this->formId = $this->get('formId');
     $this->close = JRequest::getInt('close');
     $this->condition = $condition;
     $this->lists = $lists;
     parent::display($tpl);
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:33,代码来源:view.html.php

示例9: display

 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->params = $this->state->get("params");
     $currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->state->params->get("project_currency"));
     $this->amount = new Crowdfunding\Amount($this->params);
     $this->amount->setCurrency($currency);
     // Get rewards number
     $usersIds = array();
     foreach ($this->items as $item) {
         $usersIds[] = $item->id;
     }
     // Get number of rewards.
     $statistics = new Crowdfunding\Statistics\Users(JFactory::getDbo(), $usersIds);
     $this->projects = $statistics->getProjectsNumber();
     $this->amounts = $statistics->getAmounts();
     // Add submenu
     CrowdfundingHelper::addSubmenu($this->getName());
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }
开发者ID:Eautentik,项目名称:CrowdFunding,代码行数:28,代码来源:view.html.php

示例10: display

 /**
  * Renders the view
  *
  * @param   string  $tpl  Template name
  *
  * @return void
  *
  * @since  2.5.4
  */
 public function display($tpl = null)
 {
     // Get data from the model
     $this->state = $this->get('State');
     // Load useful classes
     $model = $this->getModel();
     $this->loadHelper('select');
     // Assign view variables
     $ftp = $model->getFTPOptions();
     $this->assign('updateInfo', $model->getUpdateInformation());
     $this->assign('methodSelect', JoomlaupdateHelperSelect::getMethods($ftp['enabled']));
     // Set the toolbar information
     JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
     JToolbarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false);
     // Add toolbar buttons
     JToolbarHelper::preferences('com_joomlaupdate');
     // Load mooTools
     JHtml::_('behavior.framework', true);
     // Load our Javascript
     $document = JFactory::getDocument();
     $document->addScript('../media/com_joomlaupdate/default.js');
     JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
     // Render the view
     parent::display($tpl);
 }
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:34,代码来源:view.html.php

示例11: display

 function display($tpl = null)
 {
     $state = $this->get('State');
     $this->params = $state->get("parameters.menu");
     $categoryId = JRequest::getVar('categoryId');
     $this->assignRef('categoryId', $categoryId);
     $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings();
     $events = $this->get('Events');
     $this->assignRef('events', $events);
     //dump($events);
     $categories = $this->get('Categories');
     $this->assignRef('categories', $categories);
     if ($this->appSettings->enable_search_filter_events) {
         $serachFilter = $this->get('SeachFilter');
         $this->assignRef('searchFilter', $serachFilter);
     }
     $categoryId = $this->get('CategoryId');
     if (!empty($categoryId)) {
         $this->categoryId = $categoryId;
         $this->category = $this->get('Category');
     }
     $pagination = $this->get('Pagination');
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
开发者ID:benji1979,项目名称:teszt1,代码行数:25,代码来源:view.html.php

示例12: display

 public function display($tpl = null)
 {
     $this->option = JFactory::getApplication()->input->get('option');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Get parameters of com_crowdfunding.
     /** @var  $cParams Joomla\Registry\Registry */
     $cParams = JComponentHelper::getParams('com_crowdfunding');
     $this->cfParams = $cParams;
     $currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->cfParams->get('project_currency'));
     $this->amount = new Crowdfunding\Amount($this->cfParams);
     $this->amount->setCurrency($currency);
     // Get rewards number
     $projectsIds = array();
     foreach ($this->items as $item) {
         $projectsIds[] = $item->id;
     }
     $projects = new Crowdfunding\Projects(JFactory::getDbo());
     $this->transactions = $projects->getTransactionsNumber($projectsIds);
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }
开发者ID:bellodox,项目名称:CrowdfundingFinance,代码行数:28,代码来源:view.html.php

示例13: display

    /**
     * Renders the view
     *
     * @param   string  $tpl  Template name
     *
     * @return void
     */
    public function display($tpl = null)
    {
        $password = JFactory::getApplication()->getUserState('com_joomlaupdate.password', null);
        $filesize = JFactory::getApplication()->getUserState('com_joomlaupdate.filesize', null);
        $ajaxUrl = JUri::base() . 'components/com_joomlaupdate/restore.php';
        $returnUrl = 'index.php?option=com_joomlaupdate&task=update.finalise';
        // Set the toolbar information
        JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
        JToolBarHelper::divider();
        JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE');
        // Add toolbar buttons
        if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) {
            JToolbarHelper::preferences('com_joomlaupdate');
        }
        // Load mooTools
        JHtml::_('behavior.framework', true);
        $updateScript = <<<ENDSCRIPT
var joomlaupdate_password = '{$password}';
var joomlaupdate_totalsize = '{$filesize}';
var joomlaupdate_ajax_url = '{$ajaxUrl}';
var joomlaupdate_return_url = '{$returnUrl}';

ENDSCRIPT;
        // Load our Javascript
        $document = JFactory::getDocument();
        $document->addScript('../media/com_joomlaupdate/json2.js');
        $document->addScript('../media/com_joomlaupdate/encryption.js');
        $document->addScript('../media/com_joomlaupdate/update.js');
        JHtml::_('script', 'system/progressbar.js', true, true);
        JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
        $document->addScriptDeclaration($updateScript);
        // Render the view
        parent::display($tpl);
    }
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:41,代码来源:view.html.php

示例14: display

 function display($tpl = null)
 {
     // Initialise variables.
     $this->item = $this->get('Item');
     $this->_prepareDocument();
     parent::display($tpl);
 }
开发者ID:ngxuanmui,项目名称:hp3,代码行数:7,代码来源:view.html.php

示例15: display

 /**
  * The default method that will display the output of this view which is called by
  * Joomla
  *
  * @param	string template	Template file name
  **/
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     //$search				= $mainframe->getUserStateFromRequest( "com_community.videos.search", 'search', '', 'string' );
     $search = JRequest::getVar('search', '');
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_COMMUNITY_VIDEOS'), 'videos');
     // Add the necessary buttons
     JToolbarHelper::custom('fetchThumbnail', 'pictures', '', JText::_('COM_COMMUNITY_FETCH_THUMBNAIL'));
     JToolBarHelper::trash('delete', JText::_('COM_COMMUNITY_DELETE'));
     JToolBarHelper::publishList('publish', JText::_('COM_COMMUNITY_PUBLISH'));
     JToolBarHelper::unpublishList('unpublish', JText::_('COM_COMMUNITY_UNPUBLISH'));
     $videos = $this->get('Videos');
     $pagination = $this->get('Pagination');
     $categories = $this->get('Categories');
     foreach ($videos as $key => $vid) {
         foreach ($categories as $cat) {
             $videos[$key]->categoryName = '';
             if ($cat->id == $vid->category_id) {
                 $videos[$key]->categoryName = $cat->name;
                 break;
             }
         }
     }
     $catHTML = $this->_getCategoriesHTML($categories);
     $this->assignRef('videos', $videos);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('search', $search);
     $this->assignRef('categories', $catHTML);
     parent::display($tpl);
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:38,代码来源:view.html.php


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