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

PHP JLoader类代码示例

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

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



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

示例1: getItems

 /**
  * Method to get a list of tasks
  *
  * @return    array    $items    The tasks
  */
 public static function getItems($params)
 {
     JLoader::register('PFtasksModelTasks', JPATH_SITE . '/components/com_pftasks/models/tasks.php');
     $model = JModelLegacy::getInstance('Tasks', 'PFtasksModel', array('ignore_request' => true));
     // Set application parameters in model
     $app = JFactory::getApplication();
     $appParams = $app->getParams();
     $model->setState('params', $appParams);
     // Set the filters based on the module params
     $model->setState('list.start', 0);
     $model->setState('list.limit', (int) $params->get('count', 10));
     $model->setState('filter.published', 1);
     // Set project filter
     if (!(int) $params->get('tasks_of')) {
         $model->setState('filter.project', PFApplicationHelper::getActiveProjectId());
     } else {
         $project = (int) $params->get('project');
         if ($project) {
             $model->setState('filter.project', $project);
         } else {
             $model->setState('filter.project', PFApplicationHelper::getActiveProjectId());
         }
     }
     // Set completition filter
     $model->setState('filter.complete', $params->get('filter_complete'));
     // Sort and order
     $model->setState('list.ordering', $params->get('sort'));
     $model->setState('list.direction', $params->get('order'));
     $items = $model->getItems();
     return $items;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:36,代码来源:helper.php


示例2: display

 /**
  * Return JSON encoded data for Statistic page
  */
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $params = $app->getParams();
     jimport('joomla.environment.request');
     /* validating request */
     $guild_id = $params->get('guild_id', '0');
     $groups = $params->get('allowed_groups');
     $by_chars = $params->get('stats_by_chars', 0);
     $show_rating = $params->get('show_rating', 0);
     if ($guild_id != 0) {
         JRequest::setVar('guild_id', $guild_id, 'get', true);
     }
     if ($by_chars == 0) {
         JRequest::setVar('character_id', 0, 'get', true);
     }
     if ($show_rating != 0) {
         JRequest::setVar('show_rating', 1, 'get', true);
     }
     if (JRequest::getVar('group_id', '', 'get', 'int') != '') {
         if (!in_array(JRequest::getVar('group_id', '', 'get', 'int'), $groups)) {
             JRequest::setVar('group_id', '', 'get', true);
         }
     }
     /* load backend controller */
     JLoader::register('RaidPlannerControllerStats', JPATH_ADMINISTRATOR . '/components/com_raidplanner/controllers/stats.php');
     $tmp = new RaidPlannerControllerStats();
     $tmp->display();
 }
开发者ID:dnaoverride,项目名称:RaidPlanner,代码行数:32,代码来源:view.json.php


示例3: onUserTwofactorShowConfiguration

 /**
  * Shows the configuration page for this two factor authentication method.
  *
  * @param   object   $otpConfig  The two factor auth configuration object
  * @param   integer  $user_id    The numeric user ID of the user whose form we'll display
  *
  * @return  boolean|string  False if the method is not ours, the HTML of the configuration page otherwise
  *
  * @see     UsersModelUser::getOtpConfig
  * @since   3.2
  */
 public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)
 {
     if ($otpConfig->method == $this->methodName) {
         // This method is already activated. Reuse the same Yubikey ID.
         $yubikey = $otpConfig->config['yubikey'];
     } else {
         // This methods is not activated yet. We'll need a Yubikey TOTP to setup this Yubikey.
         $yubikey = '';
     }
     // Is this a new TOTP setup? If so, we'll have to show the code validation field.
     $new_totp = $otpConfig->method != $this->methodName;
     // Start output buffering
     @ob_start();
     // Include the form.php from a template override. If none is found use the default.
     $path = FOFPlatform::getInstance()->getTemplateOverridePath('plg_twofactorauth_yubikey', true);
     JLoader::import('joomla.filesystem.file');
     if (JFile::exists($path . '/form.php')) {
         include_once $path . '/form.php';
     } else {
         include_once __DIR__ . '/tmpl/form.php';
     }
     // Stop output buffering and get the form contents
     $html = @ob_get_clean();
     // Return the form contents
     return array('method' => $this->methodName, 'form' => $html);
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:37,代码来源:yubikey.php


示例4: fetchElement

 /**
  * Fetch custom Element view.
  *
  * @param   string  $name          Field Name.
  * @param   mixed   $value         Field value.
  * @param   mixed   $node          Field node.
  * @param   mixed   $control_name  Field control_name/Id.
  *
  * @since   2.2
  * @return   null
  */
 public function fetchElement($name, $value, $node, $control_name)
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     // Load Zone helper.
     $path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "zoneHelper.php";
     JLoader::register('zoneHelper', $path);
     JLoader::load('zoneHelper');
     $zoneHelper = new zoneHelper();
     // Get user's accessible zone list
     $zoneList = $zoneHelper->getUserZoneList('', array(1));
     $options = array();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $taxrate_id = $jinput->get('id');
     $defaultZoneid = "";
     if ($taxrate_id) {
         $defaultZoneid = $zoneHelper->getZoneFromTaxRateId($taxrate_id);
     }
     foreach ($zoneList as $zone) {
         $zoneName = ucfirst($zone['name']);
         $options[] = JHtml::_('select.option', $zone['id'], $zoneName);
     }
     $fieldName = $name;
     return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required"  size="1"  ', 'value', 'text', $defaultZoneid, $control_name);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:37,代码来源:zonelist.php


示例5: onAdd

 protected function onAdd($tpl = null)
 {
     /** @var AkeebaModelCpanels $model */
     $model = $this->getModel();
     $aeconfig = Factory::getConfiguration();
     // Load the helper classes
     $this->loadHelper('utils');
     $this->loadHelper('status');
     $statusHelper = AkeebaHelperStatus::getInstance();
     // Load the model
     if (!class_exists('AkeebaModelStatistics')) {
         JLoader::import('models.statistics', JPATH_COMPONENT_ADMINISTRATOR);
     }
     $statmodel = new AkeebaModelStatistics();
     $this->profileid = $model->getProfileID();
     // Active profile ID
     $this->profilelist = $model->getProfilesList();
     // List of available profiles
     $this->statuscell = $statusHelper->getStatusCell();
     // Backup status
     $this->detailscell = $statusHelper->getQuirksCell();
     // Details (warnings)
     $this->statscell = $statmodel->getLatestBackupDetails();
     $this->fixedpermissions = $model->fixMediaPermissions();
     // Fix media/com_akeeba permissions
     $this->needsdlid = $model->needsDownloadID();
     $this->needscoredlidwarning = $model->mustWarnAboutDownloadIDInCore();
     $this->extension_id = $model->getState('extension_id', 0, 'int');
     // Should I ask for permission to display desktop notifications?
     JLoader::import('joomla.application.component.helper');
     $this->desktop_notifications = \Akeeba\Engine\Util\Comconfig::getValue('desktop_notifications', '0') ? 1 : 0;
     $this->statsIframe = F0FModel::getTmpInstance('Stats', 'AkeebaModel')->collectStatistics(true);
     return $this->onDisplay($tpl);
 }
开发者ID:jvhost,项目名称:A-Website,代码行数:34,代码来源:view.html.php


示例6: onAdd

 public function onAdd($tpl = null)
 {
     $media_folder = JURI::base() . '../media/com_akeeba/';
     // Get a JSON representation of GUI data
     $json = AkeebaHelperEscape::escapeJS(AEUtilInihelper::getJsonGuiDefinition(), '"\\');
     $this->assignRef('json', $json);
     // Get profile ID
     $profileid = AEPlatform::getInstance()->get_active_profile();
     $this->assign('profileid', $profileid);
     // Get profile name
     $profileName = FOFModel::getTmpInstance('Profiles', 'AkeebaModel')->setId($profileid)->getItem()->description;
     $this->assign('profilename', $profileName);
     // Get the root URI for media files
     $this->assign('mediadir', AkeebaHelperEscape::escapeJS($media_folder . 'theme/'));
     // Are the settings secured?
     if (AEPlatform::getInstance()->get_platform_configuration_option('useencryption', -1) == 0) {
         $this->assign('securesettings', -1);
     } elseif (!AEUtilSecuresettings::supportsEncryption()) {
         $this->assign('securesettings', 0);
     } else {
         JLoader::import('joomla.filesystem.file');
         $filename = JPATH_COMPONENT_ADMINISTRATOR . '/akeeba/serverkey.php';
         if (JFile::exists($filename)) {
             $this->assign('securesettings', 1);
         } else {
             $this->assign('securesettings', 0);
         }
     }
     // Add live help
     AkeebaHelperIncludes::addHelp('config');
 }
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:31,代码来源:view.html.php


示例7: getDownloadHtml

 public static function getDownloadHtml($product_id)
 {
     $app = JFactory::getApplication();
     $html = '';
     JLoader::register("J2StoreViewDownloads", JPATH_SITE . "/components/com_j2store/views/downloads/view.html.php");
     $layout = 'freefiles';
     $view = new J2StoreViewDownloads();
     //$view->_basePath = JPATH_ROOT.DS.'components'.DS.'com_j2store';
     $view->addTemplatePath(JPATH_SITE . '/components/com_j2store/views/downloads/tmpl');
     $view->addTemplatePath(JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_j2store/downloads');
     require_once JPATH_SITE . '/components/com_j2store/models/downloads.php';
     $model = new J2StoreModelDownloads();
     $files = $model->getFreeFiles($product_id);
     $view->assign('_basePath', JPATH_SITE . '/components/com_j2store');
     $view->set('_controller', 'downloads');
     $view->set('_view', 'downloads');
     $view->set('_doTask', true);
     $view->set('hidemenu', true);
     $view->setModel($model, true);
     $view->setLayout($layout);
     $view->assign('product_id', $product_id);
     $config = JComponentHelper::getParams('com_j2store');
     $view->assign('params', $config);
     $view->assign('files', $files);
     ob_start();
     $view->display();
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:30,代码来源:downloads.php


示例8: renderInput

        function renderInput($articleid, $fieldsid, $value, $extras = null )
        {
             $required="";
            global $sitepath; 
            JLoader::register('fieldattach',  $sitepath.DS.'components/com_fieldsattach/helpers/fieldattach.php');
            
            
            $boolrequired = fieldattach::isRequired($fieldsid);
            if($boolrequired) $required="required";
            
             //Add CSS ***********************
            $str =  '<link rel="stylesheet" href="'.JURI::root() .'plugins/fieldsattachment/vimeo/vimeo.css" type="text/css" />'; 
            $app = JFactory::getApplication();
            $templateDir = JURI::base() . 'templates/' . $app->getTemplate();
            $css =  JPATH_SITE ."/administrator/templates/". $app->getTemplate(). "/html/com_fieldsattach/css/vimeo.css";
            $pathcss= JURI::root()."administrator/templates/". $app->getTemplate()."/html/com_fieldsattach/css/vimeo.css"; 
            if(file_exists($css)){ $str .=  '<link rel="stylesheet" href="'.$pathcss.'" type="text/css" />'; } 

             $str  .= '<div class="vimeo"><div class="file">';
             $str .= '<span>'.JText::_("CODE").'</span>';
             $str  .= '<input  name="field_'.$fieldsid.'" type="text" size="150" value="'.$value.'" class="customfields '.$required.'" />';
             $str  .= '</div>';
             $str  .= '<iframe src="http://player.vimeo.com/video/'.$value    .'" frameborder="0"></iframe>';
             $str .= '</div>';
             return $str  ;
        }
开发者ID:xenten,项目名称:swift-kanban,代码行数:26,代码来源:vimeo.php


示例9: __construct

 public function __construct()
 {
     JLoader::import('joomla.filesystem.file');
     //	$isPro = defined('ARS_PRO') ? (ARS_PRO == 1) : false;
     // Load the component parameters, not using JComponentHelper to avoid conflicts ;)
     JLoader::import('joomla.html.parameter');
     JLoader::import('joomla.application.component.helper');
     $db = JFactory::getDbo();
     $sql = $db->getQuery(true)->select($db->quoteName('params'))->from($db->quoteName('#__extensions'))->where($db->quoteName('type') . ' = ' . $db->quote('component'))->where($db->quoteName('element') . ' = ' . $db->quote('com_j2store'));
     $db->setQuery($sql);
     $rawparams = $db->loadResult();
     $params = new JRegistry();
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $params->loadString($rawparams, 'JSON');
     } else {
         $params->loadJSON($rawparams);
     }
     // Dev releases use the "newest" strategy
     if (substr($this->_currentVersion, 1, 2) == 'ev') {
         $this->_versionStrategy = 'newest';
     } else {
         $this->_versionStrategy = 'vcompare';
     }
     // Get the minimum stability level for updates
     $this->_minStability = $params->get('minstability', 'stable');
     // Do we need authorized URLs?
     $this->_requiresAuthorization = false;
     // Should I use our private CA store?
     if (@file_exists(dirname(__FILE__) . '/../assets/cacert.pem')) {
         $this->_cacerts = dirname(__FILE__) . '/../assets/cacert.pem';
     }
     parent::__construct();
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:33,代码来源:config.php


示例10: __construct

 /**
  * Constructor
  *
  * @since 0.1
  */
 function __construct()
 {
     // Include the tables in path
     JLoader::import('xmlrpc', JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'phpxmlrpc');
     JLoader::import('xmlrpcs', JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'phpxmlrpc');
     parent::__construct();
 }
开发者ID:Tommar,项目名称:vino2,代码行数:12,代码来源:xmlrpc.php


示例11: getOrderDetails

 public function getOrderDetails()
 {
     $orderModel = VmModel::getModel('orders');
     $orderDetails = 0;
     // If the user is not logged in, we will check the order number and order pass
     if ($orderPass = JRequest::getString('order_pass', false) and $orderNumber = JRequest::getString('order_number', false)) {
         $orderId = $orderModel->getOrderIdByOrderPass($orderNumber, $orderPass);
         if (empty($orderId)) {
             vmDebug('Invalid order_number/password ' . JText::_('COM_VIRTUEMART_RESTRICTED_ACCESS'));
             return 0;
         }
         $orderDetails = $orderModel->getOrder($orderId);
     }
     if ($orderDetails == 0) {
         $_currentUser = JFactory::getUser();
         $cuid = $_currentUser->get('id');
         // If the user is logged in, we will check if the order belongs to him
         $virtuemart_order_id = JRequest::getInt('virtuemart_order_id', 0);
         if (!$virtuemart_order_id) {
             $virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber(JRequest::getString('order_number'));
         }
         $orderDetails = $orderModel->getOrder($virtuemart_order_id);
         JLoader::register('Permissions', JPATH_VM_ADMINISTRATOR . '/helpers/permissions.php');
         if (!Permissions::getInstance()->check("admin")) {
             if (!empty($orderDetails['details']['BT']->virtuemart_user_id)) {
                 if ($orderDetails['details']['BT']->virtuemart_user_id != $cuid) {
                     echo 'view ' . JText::_('COM_VIRTUEMART_RESTRICTED_ACCESS');
                     return;
                 }
             }
         }
     }
     return $orderDetails;
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:34,代码来源:invoice.php


示例12: getInput

 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     $input = parent::getInput();
     return $input;
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:7,代码来源:jevcheckbox.php


示例13: jflanguagesType

 function jflanguagesType()
 {
     $this->values = array();
     if (ACYMAILING_J16 && file_exists(JPATH_SITE . DS . 'libraries' . DS . 'joomfish' . DS . 'manager.php') || !ACYMAILING_J16 && file_exists(JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_joomfish' . DS . 'classes' . DS . 'JoomfishManager.class.php')) {
         include_once JPATH_SITE . DS . 'components' . DS . 'com_joomfish' . DS . 'helpers' . DS . 'defines.php';
         if (!ACYMAILING_J16) {
             include_once JOOMFISH_ADMINPATH . DS . 'classes' . DS . 'JoomfishManager.class.php';
         } else {
             include_once JPATH_SITE . DS . 'libraries' . DS . 'joomfish' . DS . 'manager.php';
         }
         $jfManager = JoomFishManager::getInstance();
         $langActive = $jfManager->getActiveLanguages();
         $this->values[] = JHTML::_('select.option', '', JText::_('DEFAULT_LANGUAGE'));
         foreach ($langActive as $oneLanguage) {
             $this->values[] = JHTML::_('select.option', $oneLanguage->shortcode . ',' . $oneLanguage->id, $oneLanguage->name);
         }
         $this->found = true;
     }
     if (empty($this->values) && file_exists(JPATH_SITE . DS . 'components' . DS . 'com_falang' . DS . 'helpers' . DS . 'defines.php') && (include_once JPATH_SITE . DS . 'components' . DS . 'com_falang' . DS . 'helpers' . DS . 'defines.php')) {
         JLoader::register('FalangManager', FALANG_ADMINPATH . '/classes/FalangManager.class.php');
         $fManager = FalangManager::getInstance();
         $langActive = $fManager->getActiveLanguages();
         $this->values[] = JHTML::_('select.option', '', JText::_('DEFAULT_LANGUAGE'));
         foreach ($langActive as $oneLanguage) {
             $this->values[] = JHTML::_('select.option', $oneLanguage->lang_code . ',' . $oneLanguage->lang_id, $oneLanguage->title);
         }
         $this->found = true;
     }
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:29,代码来源:jflanguages.php


示例14: display

 /**
  * Display the view.
  *
  * @param	string	$tpl	The subtemplate to display.
  *
  * @return	void
  */
 function display($tpl = null)
 {
     // Get params
     JLoader::import('helpers.redmigrator', JPATH_COMPONENT_ADMINISTRATOR);
     $params = redMigratorHelper::getParams();
     //
     // Joomla bug: JInstaller not save the defaults params reading config.xml
     //
     $db = JFactory::getDBO();
     if (!$params->method) {
         $default_params = '{"method":"rest","rest_hostname":"http:\\/\\/www.example.org\\/","rest_username":"","rest_password":"","rest_key":"","path":"","driver":"mysql","hostname":"localhost","username":"","password":"","database":"","prefix":"jos_","skip_checks":"0","skip_files":"1","skip_templates":"1","skip_extensions":"1","skip_core_users":"0","skip_core_categories":"0","skip_core_sections":"0","skip_core_contents":"0","skip_core_contents_frontpage":"0","skip_core_menus":"0","skip_core_menus_types":"0","skip_core_modules":"0","skip_core_modules_menu":"0","skip_core_banners":"0","skip_core_banners_clients":"0","skip_core_banners_tracks":"0","skip_core_contacts":"0","skip_core_newsfeeds":"0","skip_core_weblinks":"0","positions":"0","debug":"0"}';
         $query = "UPDATE #__extensions SET `params` = '{$default_params}' WHERE `element` = 'com_redmigrator'";
         $db->setQuery($query);
         $db->query();
         // Get params.. again
         $params = redMigratorHelper::getParams();
     }
     // Load mooTools
     JHtml::_('behavior.framework', true);
     $xmlfile = JPATH_COMPONENT_ADMINISTRATOR . '/redmigrator.xml';
     $xml = JFactory::getXML($xmlfile);
     $this->params = $params;
     $this->version = $xml->version[0];
     parent::display($tpl);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:32,代码来源:view.html.php


示例15: getInstance

 /**
  * Get's an instance of the correct class that should handle the avatars
  *
  * @param   string  $type  - the avatar system to use
  *
  * @return mixed
  *
  * @throws Exception
  */
 public static function getInstance($type)
 {
     // If we already have a database connector instance for these options then just use that.
     if (empty(self::$instances[$type])) {
         // Derive the class name from the type.
         $class = 'CompojoomAvatars' . ucfirst($type);
         // If the class doesn't exist, let's look for it and register it.
         if (!class_exists($class)) {
             // Derive the file path for the type class.
             $path = dirname(__FILE__) . '/avatars/' . strtolower($type) . '.php';
             // If the file exists register the class with our class loader.
             if (file_exists($path)) {
                 JLoader::register($class, $path);
             } else {
                 throw new Exception('Specified avatar is not supported: ' . $type);
             }
         }
         // If the class still doesn't exist we have nothing left to do but throw an exception.  We did our best.
         if (!class_exists($class)) {
             throw new Exception('Specified avatar is not supported: ' . $type);
         }
         // Set the new connector to the global instances based on signature.
         self::$instances[$type] = new $class();
     }
     return self::$instances[$type];
 }
开发者ID:compojoom,项目名称:lib_compojoom,代码行数:35,代码来源:avatars.php


示例16: uploadIcon

 /**
  * Upload an icon for a work
  * 
  * @param   KCommandContext A command context object
  * @return  void
  */
 public function uploadIcon(KCommandContext $context)
 {
     $icon = KRequest::get('files.icon', 'raw');
     if (!$icon['name']) {
         return;
     }
     //Prepare MediaHelper
     JLoader::register('MediaHelper', JPATH_ROOT . '/components/com_media/helpers/media.php');
     // is it an image
     if (!MediaHelper::isImage($icon['name'])) {
         JError::raiseWarning(21, sprintf(JText::_("%s failed to upload because it's not an image."), $icon['name']));
         return;
     }
     // are we allowed to upload this filetype
     if (!MediaHelper::canUpload($icon, $error)) {
         JError::raiseWarning(21, sprintf(JText::_("%s failed to upload because %s"), $icon['name'], lcfirst($error)));
         return;
     }
     $slug = $this->getService('koowa:filter.slug');
     $path = 'images/com_portfolio/work/' . $slug->sanitize($context->data->title) . '/icon/';
     $ext = JFile::getExt($icon['name']);
     $name = JFile::makeSafe($slug->sanitize($context->data->title) . '.' . $ext);
     JFile::upload($icon['tmp_name'], JPATH_ROOT . '/' . $path . $name);
     $context->data->icon = $path . $name;
 }
开发者ID:ravenlife,项目名称:Portfolio,代码行数:31,代码来源:work.php


示例17: process

 /**
  * do the plug-in action
  * @param	object	parameters
  * @param	object	table model
  * @param	array	custom options
  */
 function process(&$params, &$model, $opts = array())
 {
     JLoader::import('webservice', JPATH_SITE . '/components/com_fabrik/models/');
     $params = $this->getParams();
     $fk = $params->get('webservice_foreign_key');
     $formModel = $model->getFormModel();
     $fk = $formModel->getElement($fk, true)->getElement()->name;
     $credentials = $this->getCredentials();
     $driver = $params->get('webservice_driver');
     $opts = array('driver' => $driver, 'endpoint' => $params->get('webservice_url'), 'credentials' => $credentials);
     $service = FabrikWebService::getInstance($opts);
     if (JError::isError($service)) {
         echo $service->getMessage();
         JError::raiseError(500, $service->getMessage());
         jexit();
     }
     $filters = $this->getServiceFilters($service);
     $service->setMap($this->getMap($formModel));
     $filters = array_merge($opts['credentials'], $filters);
     $method = $params->get('webservice_get_method');
     $startPoint = $params->get('webservice_start_point');
     $serviceData = $service->get($method, $filters, $startPoint, null);
     $update = (bool) $params->get('webservice_update_existing', false);
     $service->storeLocally($model, $serviceData, $fk, $update);
     $this->msg = JText::sprintf($params->get('webservice_msg'), $service->addedCount, $service->updateCount);
     return true;
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:33,代码来源:webservice.php


示例18: getInput

 protected function getInput()
 {
     JLoader::register('Bt_portfolioLegacyHelper', JPATH_ADMINISTRATOR . '/components/com_bt_portfolio/helpers/legacy.php');
     JHTML::_('behavior.framework');
     $checkJqueryLoaded = false;
     $document = JFactory::getDocument();
     /* $header = $document->getHeadData();
               foreach($header['scripts'] as $scriptName => $scriptData)
               {
               if(substr_count($scriptName,'/jquery')){
               $checkJqueryLoaded = true;
               }
               }
     
               //Add js
               if(!$checkJqueryLoaded)
              */
     if (!version_compare(JVERSION, '3.0', 'ge')) {
         $document->addScript(JURI::root() . 'components/com_bt_portfolio/assets/js/jquery.min.js');
         $document->addScript(JURI::root() . $this->element['path'] . 'js/chosen.jquery.min.js');
         $document->addStyleSheet(JURI::root() . $this->element['path'] . 'css/chosen.css');
     }
     $document->addScript(JURI::root() . $this->element['path'] . 'js/colorpicker/colorpicker.js');
     $document->addScript(JURI::root() . $this->element['path'] . 'js/bt.js');
     $document->addScript(JURI::root() . $this->element['path'] . 'js/btbase64.min.js');
     //Add css
     $document->addStyleSheet(JURI::root() . $this->element['path'] . 'css/bt.css');
     $document->addStyleSheet(JURI::root() . $this->element['path'] . 'js/colorpicker/colorpicker.css');
     return null;
 }
开发者ID:Tommar,项目名称:remate,代码行数:30,代码来源:asset.php


示例19: onJosettaLoadItem

 public function onJosettaLoadItem($context, $id = '')
 {
     if (!empty($context) && $context != $this->_context || empty($id)) {
         return null;
     }
     $item = parent::onJosettaLoadItem($context, $id);
     // Merge introtext and fulltext
     $item->articletext = trim($item->fulltext) != '' ? $item->introtext . "<hr id=\"system-readmore\" />" . $item->fulltext : $item->introtext;
     // Get tags
     K2Model::addIncludePath(JPATH_SITE . '/components/com_k2/models');
     JLoader::register('K2HelperUtilities', JPATH_SITE . '/components/com_k2/helpers/utilities.php');
     $model = K2Model::getInstance('Item', 'K2Model');
     $tags = $model->getItemTags($item->id);
     $tmp = array();
     foreach ($tags as $tag) {
         $tmp[] = $tag->name;
     }
     $item->tags = implode(', ', $tmp);
     // Get extra fields
     $extraFields = $model->getItemExtraFields($item->extra_fields);
     $html = '';
     if (count($extraFields)) {
         $html .= '<ul>';
         foreach ($extraFields as $key => $extraField) {
             $html .= '<li class="type' . ucfirst($extraField->type) . ' group' . $extraField->group . '">
             <span class="itemExtraFieldsLabel">' . $extraField->name . ':</span>
             <span class="itemExtraFieldsValue">' . $extraField->value . '</span>
         </li>';
         }
         $html .= '</ul>';
     }
     $item->extra_fields = $html;
     // Return the item
     return $item;
 }
开发者ID:Roma48,项目名称:abazherka_old,代码行数:35,代码来源:k2item.php


示例20: getItems

 /**
  *
  * @return unknown_type
  */
 function getItems()
 {
     // Check the registry to see if our Citruscart class has been overridden
     if (!class_exists('Citruscart')) {
         JLoader::register("Citruscart", JPATH_ADMINISTRATOR . "/components/com_citruscart/defines.php");
     }
     // load the config class
     Citruscart::load('Citruscart', 'defines');
     JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_citruscart/tables');
     // get the model
     Citruscart::load('CitruscartModelCategories', 'models.categories');
     $model = new CitruscartModelCategories(array());
     // $model = JModelLegacy::getInstance( 'Categories', 'CitruscartModel' ); doesnt work sometimes without no apparent reason
     // TODO Make this depend on the current filter_category?
     // setting the model's state tells it what items to return
     $model->setState('filter_enabled', '1');
     $model->setState('order', 'tbl.lft');
     // set the states based on the parameters
     // using the set filters, get a list
     $items = $model->getList();
     if (!empty($items)) {
         foreach ($items as $item) {
             Citruscart::load('CitruscartHelperRoute', 'helpers.route');
             $item->itemid = CitruscartHelperRoute::category($item->category_id, true);
             if (empty($item->itemid)) {
                 $item->itemid = $this->params->get('itemid');
             }
         }
     }
     return $items;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:35,代码来源:helper.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP JLog类代码示例发布时间:2022-05-23
下一篇:
PHP JLayoutHelper类代码示例发布时间: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