本文整理汇总了PHP中JView::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JView::__construct方法的具体用法?PHP JView::__construct怎么用?PHP JView::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JView
的用法示例。
在下文中一共展示了JView::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function __construct($config = array()){
parent::__construct($config);
$this->profiler = KunenaProfiler::instance('Kunena');
$this->me = KunenaUserHelper::getMyself();
$this->config = KunenaFactory::getConfig();
$this->template = KunenaFactory::getTemplate();
}
示例2:
function __construct($params)
{
parent::__construct($params);
$this->addHelperPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers');
$this->loadHelper('html');
$this->loadHelper('dtregister');
}
示例3: array
function __construct($config = array())
{
parent::__construct($config);
$cfg = BidsHelperTools::getConfig();
$this->assignRef('cfg', $cfg);
JHTML::stylesheet('com_bids.css', JURI::root() . 'administrator/components/com_bids/css/');
}
示例4: 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;
$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();
}
示例5: array
function __construct($config = array())
{
global $mainframe, $option;
parent::__construct($config);
$document =& JFactory::getDocument();
$document->addStyleSheet('components/' . $option . '/assets/rokecwid.css');
}
示例6: array
function __construct($config = array())
{
parent::__construct($config);
$this->lists = new JObject();
$tmpl_path = JPATH_COMPONENT_ADMINISTRATOR . '/plugins/views/buadmin/tmpl';
$this->addTemplatePath($tmpl_path);
}
示例7: array
function __construct($config = null)
{
parent::__construct( array(
'base_path' => JPATH_COMPONENT .DS. 'installer'
) );
$this->_addPath('template', dirname(__FILE__).DS.'tmpl');
}
示例8:
/**
* @since 1.5
*/
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');
}
示例9: ResetViewReset
function ResetViewReset()
{
parent::__construct();
$document = JFactory::getDocument();
$document->addScript('components/com_jotcache/assets/jotcache.js');
$document->addStyleSheet('components/com_jotcache/assets/jotcache.css');
}
示例10: __construct
public function __construct($config = array())
{
$mainframe =& JFactory::getApplication();
$this->my =& JFactory::getUser();
parent::__construct($config);
$view = JRequest::getVar('view', '', 'REQUEST');
}
示例11:
function __construct($tpl = null)
{
//Importamos el plugin de formato de moneda
$this->pluginCatalogo =& JDispatcher::getInstance();
$this->catalogoComponentConfig =& JComponentHelper::getParams('com_catalogo_planes');
$this->root_path = JURI::base() . 'components/com_catalogo_planes/assets/';
parent::__construct($tpl);
}
示例12: array
/**
* Constructor
*
* @access protected
*/
function __construct($config = array())
{
parent::__construct($config);
//initializing object properties
$this->id = JRequest::getVar('record', JRequest::getVar('id'));
//loading resources
$this->u =& JFactory::getUser();
}
示例13: __construct
public function __construct($config = array())
{
$option = JRequest::getCmd('option');
parent::__construct($config);
$document =& JFactory::getDocument();
$session =& JFactory::getSession();
$this->rtmodel = new RokGallery_Site_DetailModel();
}
示例14: __construct
public function __construct($config = array())
{
// Call the parent constructor
parent::__construct($config);
// Import use full variables from JFactory
$this->db = JFactory::getDBO();
$this->uri = JFactory::getURI();
$this->document = JFactory::getDocument();
$this->user = JFactory::getUser();
$this->application = JFactory::getApplication();
// Create the namespace-variables
$this->_view = !empty($config['name']) ? $config['name'] : JRequest::getCmd('view', 'default');
$this->_option = !empty($config['option']) ? $config['option'] : JRequest::getCmd('option');
$this->_name = $this->_view;
$this->_option_id = $this->_option . '_' . $this->_view . '_';
if ($this->application->isSite()) {
$this->_option_id .= JRequest::getInt('Itemid') . '_';
}
// Set the parameters
if (empty($this->params)) {
if (YireoHelper::isJoomla15() || $this->application->isSite() == false) {
$this->params = JComponentHelper::getParams($this->_option);
} else {
$this->params = $this->application->getParams($this->_option);
}
}
// Determine whether this view is single or not
if ($this->_single === null) {
$className = get_class($this);
if (preg_match('/s$/', $className)) {
$this->_single = false;
} else {
$this->_single = true;
}
}
// Add some backend-elements
if ($this->application->isAdmin()) {
// Automatically set the title
$this->setTitle();
$this->setMenu();
$this->setAutoclean(true);
// Add some things to the task-bar
if ($this->_single && $this->loadToolbar == true) {
JToolBarHelper::custom('savenew', 'save.png', 'save.png', 'LIB_YIREO_VIEW_TOOLBAR_SAVENEW', false, true);
JToolBarHelper::custom('savecopy', 'copy.png', 'copy.png', 'LIB_YIREO_VIEW_TOOLBAR_SAVECOPY', false, true);
JToolBarHelper::save();
JToolBarHelper::apply();
if ($this->isEdit() == false) {
JToolBarHelper::cancel();
} else {
JToolBarHelper::cancel('cancel', 'LIB_YIREO_VIEW_TOOLBAR_CLOSE');
}
JHTML::_('behavior.tooltip');
}
}
}
示例15:
function __construct($config = null)
{
parent::__construct($config);
$this->_addPath('template', $this->_basePath . DS . 'views' . DS . 'abstract' . DS . 'tmpl');
// note that the name config variable is ignored in the parent construct!
if (JVersion::isCompatible("2.5")) {
$theme = JEV_CommonFunctions::getJEventsViewName();
$this->addTemplatePath(JPATH_BASE . DS . 'templates' . DS . JFactory::getApplication()->getTemplate() . DS . 'html' . DS . JEV_COM_COMPONENT . DS . $theme . DS . $this->getName());
// or could have used
//$this->addTemplatePath( JPATH_BASE.DS.'templates'.DS.JFactory::getApplication()->getTemplate().DS.'html'.DS.JEV_COM_COMPONENT.DS.$config['name'] );
}
}