当前位置: 首页>>代码示例>>PHP>>正文


PHP JFBCFactory::getAllWidgets方法代码示例

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


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

示例1: getInput

 protected function getInput()
 {
     JFactory::getDocument()->addScript(JUri::root() . 'media/sourcecoast/js/jq-bootstrap-1.8.3.js');
     JFactory::getDocument()->addScript('components/com_jfbconnect/assets/jfbconnect-admin.js');
     $modProvider = $this->form->getValue('params.provider_type');
     $widgets = JFBCFactory::getAllWidgets($modProvider);
     $options = array();
     $options[] = JHtml::_('select.option', "widget", "--Select your widget--");
     foreach ($widgets as $widget) {
         $options[] = JHtml::_('select.option', $widget->getSystemName(), $widget->getName());
     }
     $html = JHTML::_('select.genericlist', $options, 'jform[params][widget_type]', 'onchange="jfbcAdmin.scsocialwidget.fetchSettings(this.value);"', 'value', 'text', $this->form->getValue('params.widget_type'));
     return '<div id="widget_list">' . $html . '</div>';
 }
开发者ID:q0821,项目名称:esportshop,代码行数:14,代码来源:widgetlist.php

示例2: scsocialprovider

 function scsocialprovider()
 {
     $input = JFactory::getApplication()->input;
     $modProvider = $input->get('provider');
     $widgets = JFBCFactory::getAllWidgets($modProvider);
     $options = array();
     $options[] = JHtml::_('select.option', "widget", "--Select your widget--");
     foreach ($widgets as $widget) {
         $options[] = JHtml::_('select.option', $widget->getSystemName(), $widget->getName());
     }
     $registry = $this->getModuleSettings($input->getInt('id'));
     echo JHTML::_('select.genericlist', $options, 'jform[params][widget_type]', 'onchange="jfbcAdmin.scsocialwidget.fetchSettings(this.value);"', 'value', 'text', $registry->get('widget_type'));
     if ($registry->get('widget_type') != "widget") {
         echo "<script>jfbcAdmin.scsocialwidget.fetchSettings('" . $registry->get('widget_type') . "');</script>";
     }
     exit;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:17,代码来源:ajax.php

示例3: replaceJSPlaceholders

 private function replaceJSPlaceholders()
 {
     $contents = JResponse::getBody();
     $javascript = '';
     $providers = JFBCFactory::getAllProviders();
     foreach ($providers as $provider) {
         $javascript .= $provider->getHeadData();
     }
     $pinterestWidgets = JFBCFactory::getAllWidgets('pinterest');
     $javascript .= $pinterestWidgets[0]->getHeadData();
     JFBConnectProviderPinterestWidgetShare::$needsJavascript = false;
     $contents = str_replace('<SourceCoastProviderJSPlaceholder />', $javascript, $contents);
     JResponse::setBody($contents);
 }
开发者ID:q0821,项目名称:esportshop,代码行数:14,代码来源:jfbcsystem.php

示例4: foreach

?>
        </select>
    </div>
</div>
<div class="clearfix"> </div>

<?php 
//set filter to empty to show all
if ($filter_provider == 'all') {
    $filter_provider = '';
}
foreach ($providersWithWidgets as $providerName) {
    if ($filter_provider && $filter_provider != $providerName) {
        continue;
    }
    $widgets = JFBCFactory::getAllWidgets($providerName);
    foreach ($widgets as $widget) {
        echo '<p> </p><h3>' . ucfirst($providerName) . ' - ' . $widget->getName() . '</h3>';
        if (isset($widget->examples)) {
            echo implode('<br/>', $widget->examples) . '<br/><br/>';
        }
        echo '<table class="table table-striped">
            <tr>
                <th>' . JText::_('COM_JFBCONNECT_SOCIAL_EXAMPLES_PARAMETER') . '</th>
                <th>' . JText::_('COM_JFBCONNECT_SOCIAL_OPTIONS') . '</th>
                <th>' . JText::_('COM_JFBCONNECT_SOCIAL_EXAMPLES_DESCRIPTION') . '</th>
            </tr>';
        $xmlFile = JPATH_ROOT . '/components/com_jfbconnect/libraries/provider/' . $providerName . '/widget/' . $widget->getSystemName() . '.xml';
        $rawXml = simplexml_load_file($xmlFile);
        $fields = $rawXml->xpath("//field");
        foreach ($fields as $field) {
开发者ID:q0821,项目名称:esportshop,代码行数:31,代码来源:examples.php


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