• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP VmModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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);
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:30,代码来源:view.html.php


示例2: display

 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $document->setMimeEncoding('application/json');
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //JResponse::setHeader( 'Content-Disposition', 'attachment; filename="media'.$virtuemart_media_id.'.json"' );
         $model = VmModel::getModel('Media');
         $image = $model->createMediaByIds($virtuemart_media_id);
         // 			echo '<pre>'.print_r($image,1).'</pre>';
         $this->json = $image[0];
         //echo json_encode($this->json);
         if (isset($this->json->file_url)) {
             $this->json->file_root = JURI::root(true) . '/';
             $this->json->msg = 'OK';
             echo @json_encode($this->json);
         } else {
             $this->json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo @json_encode($this->json);
         }
     } else {
         if (!class_exists('VmMediaHandler')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php';
         }
         $start = vRequest::getInt('start', 0);
         $type = vRequest::getCmd('mediatype', 0);
         $list = VmMediaHandler::displayImages($type, $start);
         echo @json_encode($list);
     }
     jExit();
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:30,代码来源:view.json.php


示例3:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('virtuemart_manufacturercategories_id');
     $this->setMainTable('manufacturercategories');
     $this->addvalidOrderingFieldName(array('mf_category_name'));
     $config = JFactory::getConfig();
 }
开发者ID:Arturogcalleja,项目名称:herbolario,代码行数:12,代码来源:manufacturercategories.php


示例4:

	/**
	 * constructs a VmModel
	 * setMainTable defines the maintable of the model
	 * @author Max Milbers
	 */
	function __construct() {
		parent::__construct('virtuemart_media_id');
		$this->setMainTable('medias');
		$this->addvalidOrderingFieldName(array('ordering'));
		$this->_selectedOrdering = 'created_on';

	}
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:12,代码来源:media.php


示例5: updateOrderItems

 function updateOrderItems()
 {
     vRequest::vmCheckToken();
     $model = VmModel::getModel('report');
     $model->updateOrderItems();
     $this->setRedirect($this->redirectPath, 'Order Items updated');
 }
开发者ID:lenard112,项目名称:cms,代码行数:7,代码来源:report.php


示例6: display

 function display($tpl = null)
 {
     //Load helpers
     $this->loadHelper('currencydisplay');
     $this->loadHelper('html');
     // Get the data
     $model = VmModel::getModel('product');
     // Create filter
     $this->addStandardDefaultViewLists($model);
     $inventorylist = $model->getProductListing(false, false);
     $pagination = $model->getPagination();
     $this->assignRef('pagination', $pagination);
     // Apply currency
     $currencydisplay = CurrencyDisplay::getInstance();
     foreach ($inventorylist as $virtuemart_product_id => $product) {
         //TODO oculd be interesting to show the price for each product, and all stored ones $product->product_in_stock
         $product->product_instock_value = $currencydisplay->priceDisplay($product->product_price, '', $product->product_in_stock, false);
         $product->product_price_display = $currencydisplay->priceDisplay($product->product_price, '', 1, false);
         $product->weigth_unit_display = ShopFunctions::renderWeightUnit($product->product_weight_uom);
     }
     $this->assignRef('inventorylist', $inventorylist);
     $options = array();
     $options[] = JHTML::_('select.option', '', JText::_('COM_VIRTUEMART_DISPLAY_STOCK') . ':');
     $options[] = JHTML::_('select.option', 'stocklow', JText::_('COM_VIRTUEMART_STOCK_LEVEL_LOW'));
     $options[] = JHTML::_('select.option', 'stockout', JText::_('COM_VIRTUEMART_STOCK_LEVEL_OUT'));
     $this->lists['stockfilter'] = JHTML::_('select.genericlist', $options, 'search_type', 'onChange="document.adminForm.submit(); return false;"', 'value', 'text', JRequest::getVar('search_type'));
     $this->lists['filter_product'] = JRequest::getVar('filter_product');
     // $this->assignRef('lists', $lists);
     /* Toolbar */
     $this->SetViewTitle('PRODUCT_INVENTORY');
     JToolBarHelper::publish();
     JToolBarHelper::unpublish();
     parent::display($tpl);
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:34,代码来源:view.html.php


示例7: 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();
     $config = JFactory::getConfig();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $cid = vRequest::getInt('cid');
         $task = vRequest::getCmd('task', 'add');
         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(vRequest::getCmd('search', false));
         $this->assignRef('currencies', $currencies);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:lenard112,项目名称:cms,代码行数:33,代码来源:view.html.php


示例8: display

	function display($tpl = null) {

		// Load the helper(s)


		if (!class_exists('VmHTML'))
			require(VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php');

		$this->SetViewTitle();


		$model = VmModel::getModel();

//		$stateId = vRequest::getVar('virtuemart_state_id');
//		$model->setId($stateId);
		$state = $model->getSingleState();

		$countryId = vRequest::getInt('virtuemart_country_id', 0);
		if(empty($countryId)) $countryId = $state->virtuemart_country_id;
		$this->assignRef('virtuemart_country_id',	$countryId);

        $isNew = (count($state) < 1);

		if(empty($countryId) && $isNew){
			vmWarn('Country id is 0');
			return false;
		}

		$country = VmModel::getModel('country');
		$country->setId($countryId);
		$this->assignRef('country_name', $country->getData()->country_name);


		$layoutName = vRequest::getCmd('layout', 'default');
		if ($layoutName == 'edit') {


			$this->assignRef('state', $state);

			$zoneModel = VmModel::getModel('Worldzones');
			$wzsList = $zoneModel->getWorldZonesSelectList();
			$this->assignRef('worldZones', $wzsList);

			$this->addStandardEditViewCommands();

		} else {

			$this->addStandardDefaultViewCommands();
			$this->addStandardDefaultViewLists($model);

			$states = $model->getStates($countryId);
			$this->assignRef('states',	$states);

			$pagination = $model->getPagination();
			$this->assignRef('pagination', $pagination);

		}

		parent::display($tpl);
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:60,代码来源:view.html.php


示例9: display

 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     // get necessary model
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $manufacturerCategory = $model->getData();
         $this->manufacturerCategory = $manufacturerCategory;
         $this->SetViewTitle('MANUFACTURER_CATEGORY', $manufacturerCategory->mf_category_name);
         $this->addStandardEditViewCommands($manufacturerCategory->virtuemart_manufacturercategories_id);
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->SetViewTitle('MANUFACTURER_CATEGORY');
             $this->addStandardDefaultViewCommands();
         }
         $this->addStandardDefaultViewLists($model);
         $this->manufacturerCategories = $model->getManufacturerCategories();
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:28,代码来源:view.html.php


示例10: display

 function display($tpl = null)
 {
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $this->vendorId = VmConfig::isSuperVendor();
     // TODO add icon for media view
     $this->SetViewTitle();
     $model = VmModel::getModel('media');
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $this->media = $model->getFile();
         $this->addStandardEditViewCommands();
     } else {
         $virtuemart_product_id = vRequest::getInt('virtuemart_product_id');
         if (is_array($virtuemart_product_id) && count($virtuemart_product_id) > 0) {
             $virtuemart_product_id = (int) $virtuemart_product_id[0];
         } else {
             $virtuemart_product_id = (int) $virtuemart_product_id;
         }
         $cat_id = vRequest::getInt('virtuemart_category_id', 0);
         JToolBarHelper::custom('synchronizeMedia', 'new', 'new', vmText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
         $options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_TYPES'), 'product' => vmText::_('COM_VIRTUEMART_PRODUCT'), 'category' => vmText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => vmText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => vmText::_('COM_VIRTUEMART_VENDOR'));
         $this->lists['search_type'] = VmHTML::selectList('search_type', vRequest::getVar('search_type'), $options, 1, '', 'onchange="this.form.submit();"');
         $options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
         $this->lists['search_role'] = VmHTML::selectList('search_role', vRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
         $this->files = $model->getFiles(false, false, $virtuemart_product_id, $cat_id);
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:33,代码来源:view.html.php


示例11: display

 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(VMPATH_ADMIN . DS . 'helpers');
     if (!class_exists('vmPSPlugin')) {
         require VMPATH_PLUGINLIBS . DS . 'vmpsplugin.php';
     }
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = vRequest::getCmd('layout', 'default');
     $this->SetViewTitle();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         VmConfig::loadJLang('plg_vmpsplugin', false);
         JForm::addFieldPath(VMPATH_ADMIN . DS . 'fields');
         $shipment = $model->getShipment();
         // Get the payment XML.
         $formFile = vRequest::filterPath(VMPATH_ROOT . DS . 'plugins' . DS . 'vmshipment' . DS . $shipment->shipment_element . DS . $shipment->shipment_element . '.xml');
         if (file_exists($formFile)) {
             $shipment->form = JForm::getInstance($shipment->shipment_element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
             $shipment->params = new stdClass();
             $varsToPush = vmPlugin::getVarsToPushFromForm($shipment->form);
             VmTable::bindParameterableToSubField($shipment, $varsToPush);
             $shipment->form->bind($shipment->getProperties());
         } else {
             $shipment->form = null;
         }
         if (!class_exists('VmImage')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'image.php';
         }
         if (!class_exists('VirtueMartModelVendor')) {
             require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
         }
         $vendor_id = 1;
         $currency = VirtueMartModelVendor::getVendorCurrency($vendor_id);
         $this->assignRef('vendor_currency', $currency->currency_symbol);
         if ($this->showVendors()) {
             $vendorList = ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->pluginList = self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id);
         $this->assignRef('shipment', $shipment);
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids, true);
         $this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id);
     } else {
         JToolBarHelper::custom('cloneshipment', 'copy', 'copy', vmText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $this->shipments = $model->getShipments();
         VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
         foreach ($this->shipments as &$data) {
             // Write the first 5 shoppergroups in the list
             $data->shipmentShoppersList = shopfunctions::renderGuiList($data->virtuemart_shoppergroup_ids, 'shoppergroups', 'shopper_group_name', 'shopper');
         }
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:60,代码来源:view.html.php


示例12: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     JPlugin::loadLanguage('com_virtuemart', JPATH_ADMINISTRATOR);
     $model = VmModel::getModel('Manufacturer');
     $manufacturers = $model->getManufacturers(true, true, false);
     return JHTML::_('select.genericlist', $manufacturers, $control_name . '[' . $name . ']', '', $name, 'mf_name', $value, $control_name . $name);
 }
开发者ID:joselapria,项目名称:virtuemart,代码行数:7,代码来源:vmmanufacturersmenu.php


示例13:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('virtuemart_custom_id');
     $this->setMainTable('customs');
     $this->setToggleName('admin_only');
     $this->setToggleName('is_hidden');
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:12,代码来源:custom.php


示例14:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('states');
     $this->_selectedOrdering = 'state_name';
     $this->_selectedOrderingDir = 'DESC';
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:12,代码来源:state.php


示例15: save

 function save($data = 0)
 {
     $fileModel = VmModel::getModel('media');
     //Now we try to determine to which this media should be long to
     $data = array_merge(vRequest::getRequest(), vRequest::get('media'));
     //$data['file_title'] = vRequest::getVar('file_title','','post','STRING',JREQUEST_ALLOWHTML);
     if (!empty($data['file_description'])) {
         $data['file_description'] = JComponentHelper::filterText($data['file_description']);
         //vRequest::filter(); vRequest::getHtml('file_description','');
     }
     /*$data['media_action'] = vRequest::getCmd('media[media_action]');
     		$data['media_attributes'] = vRequest::getCmd('media[media_attributes]');
     		$data['file_type'] = vRequest::getCmd('media[file_type]');*/
     if (empty($data['file_type'])) {
         $data['file_type'] = $data['media_attributes'];
     }
     $msg = '';
     if ($id = $fileModel->store($data)) {
         $msg = vmText::_('COM_VIRTUEMART_FILE_SAVED_SUCCESS');
     }
     $cmd = vRequest::getCmd('task');
     if ($cmd == 'apply') {
         $redirection = 'index.php?option=com_virtuemart&view=media&task=edit&virtuemart_media_id=' . $id;
     } else {
         $redirection = 'index.php?option=com_virtuemart&view=media';
     }
     $this->setRedirect($redirection, $msg);
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:28,代码来源:media.php


示例16: 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);
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:31,代码来源:view.html.php


示例17: getList

    JLoader::import('product', JPATH_ADMINISTRATOR . '/components/com_virtuemart/models');
}
if (!class_exists('VmModel')) {
    require JPATH_ADMINISTRATOR . '/components/com_virtuemart/helpers/vmmodel.php';
}
abstract class modNSSP2VMHelper
{
    public static function getList($params, $count)
    {
        $productModel = VmModel::getModel('Product');
        $products = $productModel->getProductListing($params->get('vmordering', 'latest'), $count, true, true, false, true, $params->get('vmcat', NULL));
        $productModel->addImages($products);
        $currency = CurrencyDisplay::getInstance();
        if (count($products)) {
            foreach ($products as $item) {
                $author =& JFactory::getUser($item->created_by);
                $item->created = $item->created_on;
                $item->author = $author->name;
                $item->hits = $item->hits;
                $item->category = $item->category_name;
                $item->cat_link = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $item->virtuemart_category_id);
                $item->image = $item->images[0]->file_url;
                $item->title = $item->product_name;
                $item->introtext = $item->product_s_desc;
                $item->price = round($item->prices['salesPrice'], 2) . $currency->getSymbol();
                $item->addtocart = self::addtocart($item);
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:26,代码来源:vmhelper.php


示例18: 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);
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:33,代码来源:view.html.php


示例19: save

 function save($data = 0)
 {
     $fileModel = VmModel::getModel('media');
     //Now we try to determine to which this media should be long to
     $data = JRequest::get('post');
     //$data['file_title'] = JRequest::getVar('file_title','','post','STRING',JREQUEST_ALLOWHTML);
     $data['file_description'] = JRequest::getVar('file_description', '', 'post', 'STRING', JREQUEST_ALLOWHTML);
     $data['media_attributes'] = JRequest::getWord('media_attributes');
     $data['file_type'] = JRequest::getWord('file_type');
     if (empty($data['file_type'])) {
         $data['file_type'] = $data['media_attributes'];
     }
     if ($id = $fileModel->store($data, $data['file_type'])) {
         $msg = JText::_('COM_VIRTUEMART_FILE_SAVED_SUCCESS');
     } else {
         $msg = $fileModel->getError();
     }
     $cmd = JRequest::getCmd('task');
     if ($cmd == 'apply') {
         $redirection = 'index.php?option=com_virtuemart&view=media&task=edit&virtuemart_media_id=' . $id;
     } else {
         $redirection = 'index.php?option=com_virtuemart&view=media';
     }
     $this->setRedirect($redirection, $msg);
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:25,代码来源:media.php


示例20: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     VmConfig::loadJLang('com_virtuemart');
     $model = VmModel::getModel('Vendor');
     $vendors = $model->getVendors(true, true, false);
     return JHTML::_('select.genericlist', $vendors, $control_name . '[' . $name . ']', '', $name, 'vendor_name', $value, $control_name . $name);
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:7,代码来源:vmvendormenu.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP VmTable类代码示例发布时间:2022-05-23
下一篇:
PHP VmHtml类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap