本文整理汇总了PHP中VmView::display方法的典型用法代码示例。如果您正苦于以下问题:PHP VmView::display方法的具体用法?PHP VmView::display怎么用?PHP VmView::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VmView
的用法示例。
在下文中一共展示了VmView::display方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
// Load the helper(s)
$this->loadHelper('html');
$model = VmModel::getModel('country');
$zoneModel = VmModel::getModel('worldzones');
$this->SetViewTitle();
$layoutName = JRequest::getWord('layout', 'default');
if ($layoutName == 'edit') {
$country = $model->getData();
$this->assignRef('country', $country);
$this->assignRef('worldZones', $zoneModel->getWorldZonesSelectList());
$this->addStandardEditViewCommands();
} else {
$this->addStandardDefaultViewCommands(true, false);
//First the view lists, it sets the state of the model
$this->addStandardDefaultViewLists($model, 0, 'ASC');
$filter_country = JRequest::getWord('filter_country', false);
$countries = $model->getCountries(false, false, $filter_country);
$this->assignRef('countries', $countries);
$pagination = $model->getPagination();
$this->assignRef('pagination', $pagination);
}
parent::display($tpl);
}
示例2: display
function display($tpl = null)
{
$this->loadHelper('html');
$model = VmModel::getModel();
// TODO icon for this view
$this->SetViewTitle();
$layoutName = JRequest::getWord('layout', 'default');
if ($layoutName == 'edit') {
$this->usergroup = $model->getUsergroup();
$this->addStandardEditViewCommands();
} else {
if (JRequest::getWord('format', '') === 'raw') {
$tpl = 'results';
} else {
$this->addStandardDefaultViewCommands();
}
$this->addStandardDefaultViewLists($model);
$this->usergroups = $model->getUsergroups(false, true);
$this->pagination = $model->getPagination();
}
parent::display($tpl);
if ($tpl === 'results') {
echo $this->AjaxScripts();
}
}
示例3: display
function display($tpl = null)
{
// Load the helper(s)
$this->loadHelper('html');
$model = VmModel::getModel();
$config = JFactory::getConfig();
$layoutName = JRequest::getWord('layout', 'default');
if ($layoutName == 'edit') {
$cid = JRequest::getVar('cid');
$task = JRequest::getWord('task', 'add');
//JArrayHelper::toInteger($cid);
if ($task != 'add' && !empty($cid) && !empty($cid[0])) {
$cid = (int) $cid[0];
} else {
$cid = 0;
}
$model->setId($cid);
$currency = $model->getCurrency();
$this->SetViewTitle('', $currency->currency_name);
$this->assignRef('currency', $currency);
$this->addStandardEditViewCommands();
} else {
$this->SetViewTitle();
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model, 0, 'ASC');
$currencies = $model->getCurrenciesList(JRequest::getWord('search', false));
$this->assignRef('currencies', $currencies);
$pagination = $model->getPagination();
$this->assignRef('pagination', $pagination);
}
parent::display($tpl);
}
示例4: display
/**
* Collect all data to show on the template
*
* @author RolandD, Max Milbers
*/
function display($tpl = null)
{
$app = JFactory::getApplication();
$input = $app->input;
$session = JFactory::getSession();
parent::display($tpl);
}
示例5: display
function display($tpl = null)
{
// Load the helper(s)
if (!class_exists('VmConfig')) {
require JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'config.php';
}
VmConfig::loadConfig();
VmConfig::loadJLang('com_virtuemart_countries');
if (!class_exists('VmHTML')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
$model = VmModel::getModel('country');
$zoneModel = VmModel::getModel('worldzones');
$this->SetViewTitle();
$layoutName = JRequest::getWord('layout', 'default');
if ($layoutName == 'edit') {
$country = $model->getData();
$this->assignRef('country', $country);
$wzsList = $zoneModel->getWorldZonesSelectList();
$this->assignRef('worldZones', $wzsList);
$this->addStandardEditViewCommands();
} else {
$this->addStandardDefaultViewCommands(true, false);
//First the view lists, it sets the state of the model
$this->addStandardDefaultViewLists($model, 0, 'ASC');
$filter_country = JRequest::getWord('filter_country', false);
$countries = $model->getCountries(false, false, $filter_country);
$this->assignRef('countries', $countries);
$pagination = $model->getPagination();
$this->assignRef('pagination', $pagination);
}
parent::display($tpl);
}
示例6: display
function display($tpl = null)
{
// Load the helper(s)
if (!class_exists('VmHTML')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
$model = VmModel::getModel();
$layoutName = $this->getLayout();
$task = vRequest::getCmd('task', $layoutName);
$this->assignRef('task', $task);
if ($layoutName == 'edit') {
//For shoppergroup specific price display
VmConfig::loadJLang('com_virtuemart_config');
VmConfig::loadJLang('com_virtuemart_shoppers', true);
$shoppergroup = $model->getShopperGroup();
$this->SetViewTitle('SHOPPERGROUP', $shoppergroup->shopper_group_name);
$vendors = ShopFunctions::renderVendorList($shoppergroup->virtuemart_vendor_id);
$this->assignRef('vendorList', $vendors);
$this->assignRef('shoppergroup', $shoppergroup);
$this->addStandardEditViewCommands();
} else {
$this->SetViewTitle();
$showVendors = $this->showVendors();
$this->assignRef('showVendors', $showVendors);
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model);
$shoppergroups = $model->getShopperGroups(false, true);
$this->assignRef('shoppergroups', $shoppergroups);
$pagination = $model->getPagination();
$this->assignRef('sgrppagination', $pagination);
}
parent::display($tpl);
}
示例7: display
function display($tpl = null)
{
$document = JFactory::getDocument();
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
JLoader::register('VmImage', JPATH_VM_ADMINISTRATOR . '/helpers/image.php');
$virtuemart_manufacturer_id = JRequest::getInt('virtuemart_manufacturer_id', 0);
$mf_category_id = JRequest::getInt('mf_category_id', 0);
// get necessary models
$model = VmModel::getModel('manufacturer');
if ($virtuemart_manufacturer_id != 0) {
$manufacturer = $model->getManufacturer();
$model->addImages($manufacturer, 1);
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image"', false);
$document->setTitle(JText::_('COM_VIRTUEMART_MANUFACTURER_DETAILS') . ' ' . strip_tags($manufacturer->mf_name));
$this->assignRef('manufacturerImage', $manufacturerImage);
// $this->assignRef('manufacturerProductsURL', $manufacturerProductsURL);
$this->assignRef('manufacturer', $manufacturer);
$pathway->addItem(strip_tags($manufacturer->mf_name));
$this->setLayout('details');
// vmdebug('$manufacturer',$manufacturer);
} else {
$document->setTitle(JText::_('COM_VIRTUEMART_MANUFACTURER_PAGE'));
$manufacturers = $model->getManufacturers(true, true, true);
$model->addImages($manufacturers, 1);
$this->assignRef('manufacturers', $manufacturers);
$this->setLayout('default');
}
parent::display($tpl);
}
示例8: display
function display($tpl = null)
{
// Load the helper(s)
if (!class_exists('VmHTML')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
// $this->assignRef('perms', Permissions::getInstance());
$model = VmModel::getModel();
$layoutName = JRequest::getWord('layout', 'default');
if ($layoutName == 'edit') {
$shoppergroup = $model->getShopperGroup();
$this->SetViewTitle('SHOPPERGROUP', $shoppergroup->shopper_group_name);
$vendors = ShopFunctions::renderVendorList($shoppergroup->virtuemart_vendor_id);
$this->assignRef('vendorList', $vendors);
$this->assignRef('shoppergroup', $shoppergroup);
$this->addStandardEditViewCommands();
} else {
$this->SetViewTitle();
JToolBarHelper::makeDefault();
$this->loadHelper('permissions');
$showVendors = Permissions::getInstance()->check('admin');
$this->assignRef('showVendors', $showVendors);
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model);
$shoppergroups = $model->getShopperGroups(false, true);
$this->assignRef('shoppergroups', $shoppergroups);
$pagination = $model->getPagination();
$this->assignRef('pagination', $pagination);
}
parent::display($tpl);
}
示例9: display
public function display($tpl = null)
{
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
$document = JFactory::getDocument();
// $paymentResponse = JRequest::getVar('paymentResponse', '');
//Why do you we allow raw here?
// $paymentResponseHtml = JRequest::getVar('paymentResponseHtml','','default','STRING',JREQUEST_ALLOWRAW);
$layoutName = $this->getLayout();
parent::display($tpl);
}
示例10: display
function display($tpl = null)
{
// Load the helper(s)
if (!class_exists('VmHTML')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
if (!class_exists('vmCustomPlugin')) {
require JPATH_VM_PLUGINS . DS . 'vmcustomplugin.php';
}
$model = VmModel::getModel();
if (!class_exists('Permissions')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
}
// TODO Make an Icon for custom
$this->SetViewTitle('PRODUCT_CUSTOM_FIELD');
$layoutName = JRequest::getWord('layout', 'default');
if ($layoutName == 'edit') {
$this->addStandardEditViewCommands();
$customPlugin = '';
if (!class_exists('vmParameters')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php';
}
$custom = $model->getCustom();
$customfields = VmModel::getModel('customfields');
// vmdebug('VirtuemartViewCustom',$custom);
JPluginHelper::importPlugin('vmcustom');
$dispatcher = JDispatcher::getInstance();
$retValue = $dispatcher->trigger('plgVmOnDisplayEdit', array($custom->virtuemart_custom_id, &$customPlugin));
$this->SetViewTitle('PRODUCT_CUSTOM_FIELD', $custom->custom_title);
$selected = 0;
if (!empty($custom->custom_jplugin_id)) {
$selected = $custom->custom_jplugin_id;
}
$pluginList = self::renderInstalledCustomPlugins($selected);
$this->assignRef('customPlugin', $customPlugin);
$this->assignRef('pluginList', $pluginList);
$this->assignRef('custom', $custom);
$this->assignRef('customfields', $customfields);
} else {
JToolBarHelper::custom('createClone', 'copy', 'copy', JText::_('COM_VIRTUEMART_CLONE'), true);
JToolBarHelper::custom('toggle.admin_only.1', 'publish', '', JText::_('COM_VIRTUEMART_TOGGLE_ADMIN'), true);
JToolBarHelper::custom('toggle.admin_only.0', 'unpublish', '', JText::_('COM_VIRTUEMART_TOGGLE_ADMIN'), true);
JToolBarHelper::custom('toggle.is_hidden.1', 'publish', '', JText::_('COM_VIRTUEMART_TOGGLE_HIDDEN'), true);
JToolBarHelper::custom('toggle.is_hidden.0', 'unpublish', '', JText::_('COM_VIRTUEMART_TOGGLE_HIDDEN'), true);
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model);
$customs = $model->getCustoms(JRequest::getInt('custom_parent_id'), JRequest::getWord('keyword'));
$this->assignRef('customs', $customs);
$pagination = $model->getPagination();
$this->assignRef('pagination', $pagination);
}
parent::display($tpl);
}
示例11: display
public function display($tpl = null)
{
$document = JFactory::getDocument();
$layoutName = $this->getLayout();
if (!$layoutName) {
$layoutName = JRequest::getWord('layout', 'default');
}
$this->assignRef('layoutName', $layoutName);
$format = JRequest::getWord('format');
JLoader::register('VirtueMartCart', JPATH_VM_SITE . '/helpers/cart.php');
$cart = VirtueMartCart::getCart();
$this->assignRef('cart', $cart);
$this->prepareContinueLink();
shopFunctionsF::setVmTemplate($this, 0, 0, $layoutName);
parent::display($tpl);
}
示例12: display
function display($tpl = null)
{
VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
// Load the helper(s)
$this->loadHelper('html');
$layoutName = JRequest::getWord('layout');
$model = VmModel::getModel();
// The list of fields which can't be toggled
//$lists['coreFields']= array( 'name','username', 'email', 'password', 'password2' );
$lists['coreFields'] = $model->getCoreFields();
$this->addStandardDefaultViewLists($model, 'ordering', 'ASC');
$this->userfieldsList = $model->getUserfieldsList();
$this->pagination = $model->getPagination();
$this->lists['coreFields'] = $lists['coreFields'];
parent::display('results');
echo $this->AjaxScripts();
}