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


PHP JViewLegacy::__construct方法代码示例

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


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

示例1:

 function __construct()
 {
     $this->view = $this->getName();
     $this->layout = $this->getLayout();
     $this->link = 'index.php?option=com_fileuploadform&view=' . $this->view . ($this->layout != 'default' ? '&layout=' . $this->layout : '');
     parent::__construct();
 }
开发者ID:sankam-nikolya,项目名称:FileUploadForm,代码行数:7,代码来源:backview.php

示例2: __construct

 public function __construct($config = array())
 {
     $name = isset($config['name']) ? $config['name'] : $this->getName();
     $this->document = JFactory::getDocument();
     $this->document->setBase('');
     $this->profiler = KunenaProfiler::instance('Kunena');
     $this->app = JFactory::getApplication();
     $this->me = KunenaUserHelper::getMyself();
     $this->config = KunenaFactory::getConfig();
     $this->ktemplate = KunenaFactory::getTemplate();
     // Set the default template search path
     if ($this->app->isSite() && !isset($config['template_path'])) {
         $config['template_path'] = $this->ktemplate->getTemplatePaths("html/{$name}", true);
     }
     if ($this->app->isAdmin()) {
         $templateAdmin = KunenaFactory::getAdminTemplate();
         $templateAdmin->initialize();
         $config['template_path'] = $templateAdmin->getTemplatePaths($name);
     }
     parent::__construct($config);
     if ($this->app->isSite()) {
         // Add another template file lookup path specific to the current template
         $fallback = JPATH_THEMES . "/{$this->app->getTemplate()}/html/com_kunena/{$this->ktemplate->name}/{$this->getName()}";
         $this->addTemplatePath($fallback);
     }
     // Use our own browser side cache settings.
     JResponse::allowCache(false);
     JResponse::setHeader('Expires', 'Mon, 1 Jan 2001 00:00:00 GMT', true);
     JResponse::setHeader('Last-Modified', gmdate("D, d M Y H:i:s") . ' GMT', true);
     JResponse::setHeader('Cache-Control', 'no-store, must-revalidate, post-check=0, pre-check=0', true);
 }
开发者ID:proyectoseb,项目名称:University,代码行数:31,代码来源:view.php

示例3: __construct

 function __construct()
 {
     JViewLegacy::__construct();
     $this->smarty=new BidsSmarty();
     JHtml::_('behavior.mootools');
     JHTML::script(JUri::root().'components/'.APP_EXTENSION.'/js/auctions.js');
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:bids_smartyview.php

示例4: jimport

 function __construct($config = null)
 {
     parent::__construct($config);
     jimport('joomla.filesystem.file');
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JEVHelper::stylesheet('eventsadmin.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     } else {
         JEVHelper::stylesheet('eventsadminjq.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     $this->_addPath('template', $this->_basePath . '/' . 'views' . '/' . 'abstract' . '/' . 'tmpl');
     // note that the name config variable is ignored in the parent construct!
     if (JevJoomlaVersion::isCompatible("2.5")) {
         // Ok getTemplate doesn't seem to get the active menu item's template, so lets do it ourselves if it exists
         $app = JFactory::getApplication();
         // Get current template style ID
         $page_template_id = $app->isAdmin() ? "0" : @$app->getMenu()->getActive()->template_style_id;
         // Check it's a valid style with simple check
         if (!($page_template_id == "" || $page_template_id == "0")) {
             // Load the valid style:
             $db = JFactory::getDbo();
             $query = $db->getQuery(true)->select('template')->from('#__template_styles')->where('id =' . $db->quote($page_template_id) . '');
             $db->setQuery($query);
             $template = $db->loadResult();
         } else {
             $template = JFactory::getApplication()->getTemplate();
         }
         $theme = JEV_CommonFunctions::getJEventsViewName();
         $name = $this->getName();
         $name = str_replace($theme . "/", "", $name);
         $this->addTemplatePath(JPATH_BASE . '/' . 'templates' . '/' . $template . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . $theme . '/' . $name);
         // or could have used
         //$this->addTemplatePath( JPATH_BASE.'/'.'templates'.'/'.JFactory::getApplication()->getTemplate().'/'.'html'.'/'.JEV_COM_COMPONENT.'/'.$config['name'] );
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:34,代码来源:abstract.php

示例5: array

 function __construct($config = array())
 {
     $this->item = new stdClass();
     $this->media = JModelLegacy::getInstance('Media', 'TZ_PortfolioModel');
     $this->extraFields = JModelLegacy::getInstance('ExtraFields', 'TZ_PortfolioModel', array('ignore_request' => true));
     parent::__construct($config);
 }
开发者ID:Glonum,项目名称:tz_portfolio,代码行数:7,代码来源:view.html.php

示例6: __construct

 /**
  * Constructor
  *
  * @param   array  $config  Configuration array
  *
  * @since   1.5
  */
 public function __construct($config = null)
 {
     $app = JFactory::getApplication();
     parent::__construct($config);
     $this->_addPath('template', $this->_basePath . '/views/default/tmpl');
     $this->_addPath('template', JPATH_THEMES . '/' . $app->getTemplate() . '/html/com_installer/default');
 }
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:14,代码来源:view.php

示例7: __construct

 public function __construct($config)
 {
     parent::__construct($config);
     $this->app = JFactory::getApplication();
     $this->option = $this->app->input->get("option");
     $this->layoutsBasePath = JPath::clean(JPATH_COMPONENT_ADMINISTRATOR . DIRECTORY_SEPARATOR . "layouts");
 }
开发者ID:phpsource,项目名称:CrowdFunding,代码行数:7,代码来源:view.html.php

示例8: array

 /**
  * Constructor
  *
  * @access  protected
  * @return  void
  * @since   1.5.5
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->_ambit = JoomAmbit::getInstance();
     $this->_config = JoomConfig::getInstance();
     $this->_mainframe = JFactory::getApplication('administrator');
     $this->_user = JFactory::getUser();
     $this->_doc = JFactory::getDocument();
     $this->_doc->addStyleSheet($this->_ambit->getStyleSheet('admin.joomgallery.css'));
     JHtmlBehavior::framework();
     $this->_doc->addScript($this->_ambit->getScript('admin.js'));
     JoomHelper::addSubmenu();
     JHTML::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     // Check for available updates
     if (!($checked = $this->_mainframe->getUserState('joom.update.checked'))) {
         $controller = JRequest::getCmd('controller');
         if ($this->_config->get('jg_checkupdate') && $controller && $controller != 'control') {
             $dated_extensions = JoomExtensions::checkUpdate();
             if (count($dated_extensions)) {
                 $this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
                 $this->_mainframe->setUserState('joom.update.checked', -1);
             } else {
                 $this->_mainframe->setUserState('joom.update.checked', 1);
             }
         }
     } else {
         if ($checked == -1) {
             $controller = JRequest::getCmd('controller');
             if ($controller && $controller != 'control') {
                 $this->_mainframe->enqueueMessage(JText::_('COM_JOOMGALLERY_ADMENU_SYSTEM_NOT_UPTODATE'), 'warning');
             }
         }
     }
 }
开发者ID:pabloarias,项目名称:JoomGallery,代码行数:41,代码来源:view.php

示例9: __construct

	public function __construct() {
		if(!php_Boot::$skip_constructor) {
		$config = null;
		$config = Array("[\"name\":\"Joomlahaxe\"]");
		parent::__construct($config);
		defined('_JEXEC') or die("no joomla here");
	}}
开发者ID:ConfidantCommunications,项目名称:JoomlaHaxe,代码行数:7,代码来源:JoomlahaxeViewJoomlahaxe.class.php

示例10: JVersion

 function __construct()
 {
     parent::__construct();
     // Load the database and execute our sql file
     $this->db = JFactory::getDBO();
     // Get information of our plugin so we can pass it on to MDS Collivery for Logs
     $sel_query = "SELECT * FROM `#__extensions` where type = 'plugin' and element = 'mds_shipping' and folder = 'vmshipment';";
     $this->db->setQuery($sel_query);
     $this->db->query();
     $this->extension_id = $this->db->loadObjectList()[0]->extension_id;
     $this->app_name = $this->db->loadObjectList()[0]->extension_id;
     $this->app_info = json_decode($this->db->loadObjectList()[0]->manifest_cache);
     // Get our login information
     $config_query = "SELECT * FROM `#__mds_collivery_config` where id = 1;";
     $this->db->setQuery($config_query);
     $this->db->query();
     $this->password = $this->db->loadObjectList()[0]->password;
     $this->username = $this->db->loadObjectList()[0]->username;
     $this->risk_cover = $this->db->loadObjectList()[0]->risk_cover;
     $version = new JVersion();
     require_once preg_replace('|com_installer|i', "", JPATH_COMPONENT_ADMINISTRATOR) . '/helpers/config.php';
     $config = array('app_name' => $this->app_info->name, 'app_version' => $this->app_info->version, 'app_host' => "Joomla: " . $version->getShortVersion() . ' - Virtuemart: ' . VmConfig::getInstalledVersion(), 'app_url' => JURI::base(), 'user_email' => $this->username, 'user_password' => $this->password);
     // Use the MDS API Files
     require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/Mds/Cache.php';
     require_once JPATH_PLUGINS . '/vmshipment/mds_shipping/Mds/Collivery.php';
     $this->collivery = new Mds\Collivery($config);
     // Get some information from the API
     $this->towns = $this->collivery->getTowns();
     $this->services = $this->collivery->getServices();
     $this->location_types = $this->collivery->getLocationTypes();
     $this->suburbs = $this->collivery->getSuburbs(null);
 }
开发者ID:Zash22,项目名称:Collivery-Virtuemart,代码行数:32,代码来源:view.json.php

示例11: __construct

 /**
  * Constructor
  *
  * @param   array  $config  @see JViewLegacy
  *
  */
 public function __construct($config = array())
 {
     // Parent constructor
     parent::__construct($config);
     // Load the helpers
     require_once JPATH_ADMINISTRATOR . '/components/com_k2/helpers/html.php';
 }
开发者ID:Naldo100,项目名称:k2-v3-dev-build,代码行数:13,代码来源:view.php

示例12:

 function __construct()
 {
     //vishal - for j3.2 changes
     $app = JFactory::getApplication();
     $option = $app->input->get('option', '', 'STRING');
     $this->set('option', $option);
     parent::__construct();
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:8,代码来源:view.php

示例13: __construct

 public function __construct($config = array())
 {
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $this->my = CFactory::getUser();
     parent::__construct($config);
     $view = $jinput->request->get('view', '');
     $this->set('assets', CAssets::getInstance());
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:9,代码来源:views.php

示例14: __construct

 public function __construct($config = array())
 {
     // Load the AddEvent-form in JForm for the template to use
     $this->form =& JForm::getInstance('addEventForm', JPATH_COMPONENT . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'addeventform.xml');
     $jinput = JFactory::getApplication()->input;
     $this->form->setFieldAttribute('category', 'parentid', $jinput->get('category', 0, 'INT'), 'addEventFields');
     $this->form->setFieldAttribute('category', 'categorydepth', $jinput->get('categorydepth', 2, 'INT'), 'addEventFields');
     parent::__construct($config);
 }
开发者ID:kameli-2,项目名称:helkacal,代码行数:9,代码来源:view.html.php

示例15: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->_addPath('template', JPATH_COMPONENT . '/themes/default/views/query');
     $theme = DJCatalog2ThemeHelper::getThemeName();
     if ($theme && $theme != 'default') {
         $this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/views/query');
     }
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:9,代码来源:view.html.php


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