本文整理汇总了PHP中InstallerViewDefault::display方法的典型用法代码示例。如果您正苦于以下问题:PHP InstallerViewDefault::display方法的具体用法?PHP InstallerViewDefault::display怎么用?PHP InstallerViewDefault::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InstallerViewDefault
的用法示例。
在下文中一共展示了InstallerViewDefault::display方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display($tpl = null)
{
$paths = new stdClass();
$paths->first = '';
$this->assignRef('paths', $paths);
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->form = $this->get('Form');
if ($this->getLayout() == 'distribution') {
jimport('joomla.installer.installer');
// Extract the list and return it
$installer = JInstaller::getInstance();
$installer->setPath('source', $this->state->get('install.directory'));
$manifest = $installer->getManifest();
$result = false;
if ($manifest) {
$result->extensions = isset($manifest->extensions) ? $manifest->extensions : false;
$result->sql = isset($manifest->install->sql->file) ? $installer->getPath('source') . '/' . $manifest->install->sql->file : false;
$result->script = isset($manifest->scriptfile) ? $installer->getPath('source') . '/' . $manifest->scriptfile : false;
if ($result->script) {
include $installer->getPath('source') . '/' . $manifest->scriptfile;
$class = JRequest::$manifest->name . 'InstallerScript';
$script = new $class();
$result->scriptclass = $class;
$result->preflight = method_exists($script, 'preflight') ? $installer->getPath('source') . '/' . $manifest->scriptfile : false;
$result->postflight = method_exists($script, 'postflight') ? $installer->getPath('source') . '/' . $manifest->scriptfile : false;
}
}
$this->source = base64_encode($installer->getPath('source'));
$this->result = $result;
}
parent::display($tpl);
}
示例2: display
function display($tpl=null)
{
/*
* Set toolbar items for the page
*/
JToolBarHelper::deleteList( '', 'remove', 'Uninstall' );
// Get data from the model
$state = &$this->get('State');
$items = &$this->get('Items');
$pagination = &$this->get('Pagination');
$lists = new stdClass();
$select[] = JHTML::_('select.option', '-1', JText::_('All'));
$select[] = JHTML::_('select.option', '0', JText::_('Site Modules'));
$select[] = JHTML::_('select.option', '1', JText::_('Admin Modules'));
$lists->client = JHTML::_('select.genericlist', $select, 'client', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $state->get('filter.client'));
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
$this->assignRef('lists', $lists);
JHTML::_('behavior.tooltip');
parent::display($tpl);
}
示例3: display
function display($tpl = null)
{
$canDo = JCKHelper::getActions();
$app = JFactory::getApplication();
if (!$canDo->get('jckman.install')) {
$app->redirect(JRoute::_('index.php?option=com_jckman&view=cpanel', false), JText::_('COM_JCKMAN_PLUGIN_PERM_NO_INSTALL'), 'error');
return false;
}
//end if
/*
* Set toolbar items for the page
*/
$bar =& JToolBar::getInstance('toolbar');
// Add a Link button for Control Panel
$bar->appendButton('Link', 'cpanel', JText::_('COM_JCKMAN_SUBMENU_CPANEL_NAME'), 'index.php?option=com_jckman&controller=cpanel');
JToolBarHelper::help('screen.installer');
$paths = new stdClass();
$paths->first = '';
$lookup = array(JHTML::_('select.option', 0, JText::_('All')));
$selections =& $this->get('ToolbarList');
$lists['selections'] = JHTML::_('select.genericlist', $selections, 'selections[]', 'class="inputbox" size="15" multiple="multiple" style=width:182px;', 'value', 'text', $lookup, 'selections');
$this->assignRef('paths', $paths);
$this->assignRef('state', $this->get('state'));
$this->assignRef('lists', $lists);
parent::display($tpl);
}
示例4: display
/**
* Display the view
*
* @param string $tpl Template
*
* @return void
*
* @since 1.6
*/
public function display($tpl = null)
{
// Get data from the model
$this->state = $this->get('State');
$this->changeSet = $this->get('Items');
$this->errors = $this->changeSet->check();
$this->results = $this->changeSet->getStatus();
$this->schemaVersion = $this->get('SchemaVersion');
$this->updateVersion = $this->get('UpdateVersion');
$this->filterParams = $this->get('DefaultTextFilters');
$this->schemaVersion = $this->schemaVersion ? $this->schemaVersion : JText::_('JNONE');
$this->updateVersion = $this->updateVersion ? $this->updateVersion : JText::_('JNONE');
$this->pagination = $this->get('Pagination');
$this->errorCount = count($this->errors);
if (!(strncmp($this->schemaVersion, JVERSION, 5) === 0)) {
$this->errorCount++;
}
if (!$this->filterParams) {
$this->errorCount++;
}
if ($this->updateVersion != JVERSION) {
$this->errorCount++;
}
parent::display($tpl);
}
示例5: display
/**
* Display the view.
*
* @param string $tpl Template
*
* @return void
*
* @since 1.6
*/
public function display($tpl = null)
{
// Get data from the model.
$this->state = $this->get('State');
$this->changeSet = $this->get('Items');
$this->errors = $this->changeSet->check();
$this->results = $this->changeSet->getStatus();
$this->schemaVersion = $this->get('SchemaVersion');
$this->updateVersion = $this->get('UpdateVersion');
$this->filterParams = $this->get('DefaultTextFilters');
$this->schemaVersion = $this->schemaVersion ? $this->schemaVersion : JText::_('JNONE');
$this->updateVersion = $this->updateVersion ? $this->updateVersion : JText::_('JNONE');
$this->pagination = $this->get('Pagination');
$this->errorCount = count($this->errors);
if ($this->schemaVersion != $this->changeSet->getSchema()) {
$this->errorCount++;
}
if (!$this->filterParams) {
$this->errorCount++;
}
if (version_compare($this->updateVersion, JVERSION) != 0) {
$this->errorCount++;
}
if ($this->errorCount === 0) {
JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_MSG_DATABASE_OK'), 'notice');
} else {
JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_MSG_DATABASE_ERRORS'), 'warning');
}
parent::display($tpl);
}
示例6: display
/**
* Display the view
*
* @param string $tpl Template
*
* @return void
*
* @since 1.6
*/
public function display($tpl = null)
{
// Get data from the model
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
parent::display($tpl);
}
示例7: display
/**
* Display the view
*
* @param string $tpl Template
*
* @return void
*
* @since 1.5
*/
public function display($tpl = null)
{
$paths = new stdClass();
$paths->first = '';
$state = $this->get('state');
$this->paths =& $paths;
$this->state =& $state;
parent::display($tpl);
}
示例8: display
/**
* @since 1.5
*/
function display($tpl = null)
{
$paths = new stdClass();
$paths->first = '';
$state = $this->get('state');
$this->assignRef('paths', $paths);
$this->assignRef('state', $state);
parent::display($tpl);
}
示例9: display
/**
* @since 2.5
*/
function display($tpl = null)
{
// Get data from the model
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$distro = $this->getModel()->getDistro(JRequest::getVar('id', 0, '', 'int'));
$this->assign('distro', $distro);
parent::display($tpl);
}
示例10: display
/**
* Display the view.
*
* @param string $tpl Template
*
* @return void
*
* @since 1.6
*/
public function display($tpl = null)
{
// Get data from the model.
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
parent::display($tpl);
}
示例11: display
function display($tpl = null)
{
/*
* Set toolbar items for the page
*/
JToolBarHelper::help('screen.installer');
$paths = new stdClass();
$paths->first = '';
$this->assignRef('paths', $paths);
$this->assignRef('state', $this->get('state'));
parent::display($tpl);
}
示例12: display
/**
* Display the view
*
* @param string $tpl Template
*
* @return void
*
* @since 1.5
*/
public function display($tpl = null)
{
$paths = new stdClass();
$paths->first = '';
$state = $this->get('state');
$this->paths =& $paths;
$this->state =& $state;
$this->showJedAndWebInstaller = JComponentHelper::getParams('com_installer')->get('show_jed_info', 1);
JPluginHelper::importPlugin('installer');
JFactory::getApplication()->triggerEvent('onInstallerBeforeDisplay', array(&$this->showJedAndWebInstaller, $this));
parent::display($tpl);
}
示例13: display
/**
* @since 1.6
*/
function display($tpl = null)
{
// Get data from the model
$this->state = $this->get('State');
$this->changeSet = $this->get('Items');
$this->errors = $this->changeSet->check();
$this->results = $this->changeSet->getStatus();
$this->schemaVersion = $this->get('SchemaVersion');
$this->schemaVersion = $this->schemaVersion ? $this->schemaVersion : '**not found**';
$this->pagination = $this->get('Pagination');
parent::display($tpl);
}
示例14: display
/**
* Display the view
*
* @param null $tpl template to display
*
* @return mixed|void
*/
public function display($tpl = null)
{
// Get data from the model
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
parent::display($tpl);
}
示例15: display
function display($tpl = null)
{
/*
* Set toolbar items for the page
*/
JToolBarHelper::deleteList('', 'remove', 'Uninstall');
JCEToolBarHelper::help('install.plugin');
// Get data from the model
$items =& $this->get('Items');
$pagination =& $this->get('Pagination');
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
parent::display($tpl);
}