本文整理汇总了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();
}
示例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);
}
示例3: __construct
function __construct()
{
JViewLegacy::__construct();
$this->smarty=new BidsSmarty();
JHtml::_('behavior.mootools');
JHTML::script(JUri::root().'components/'.APP_EXTENSION.'/js/auctions.js');
}
示例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'] );
}
}
示例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);
}
示例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');
}
示例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");
}
示例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');
}
}
}
}
示例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");
}}
示例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);
}
示例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';
}
示例12:
function __construct()
{
//vishal - for j3.2 changes
$app = JFactory::getApplication();
$option = $app->input->get('option', '', 'STRING');
$this->set('option', $option);
parent::__construct();
}
示例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());
}
示例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);
}
示例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');
}
}