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


PHP ResponseAssetGroup::get方法代码示例

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


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

示例1: selectPage

 /**
  * Creates form fields and JavaScript page chooser for choosing a page. For use with inclusion in blocks.
  * <code>
  *     $dh->selectPage('pageID', '1'); // prints out the home page and makes it selectable.
  * </code>
  *
  * @param int $cID
  */
 public function selectPage($fieldName, $cID = false)
 {
     $r = ResponseAssetGroup::get();
     $r->requireAsset('core/sitemap');
     $selectedCID = 0;
     if (isset($_REQUEST[$fieldName])) {
         $selectedCID = Loader::helper('security')->sanitizeInt($_REQUEST[$fieldName]);
     } else {
         if ($cID > 0) {
             $selectedCID = $cID;
         }
     }
     $html = '';
     $clearStyle = 'display: none';
     $html .= '<div class="ccm-summary-selected-item" data-page-selector="' . $fieldName . '"><div class="ccm-summary-selected-item-inner"><strong class="ccm-summary-selected-item-label">';
     if ($selectedCID > 0) {
         $oc = Page::getByID($selectedCID);
         $html .= $oc->getCollectionName();
         $clearStyle = '';
     }
     $html .= '</strong></div>';
     $html .= '<a class="ccm-sitemap-select-page" data-page-selector-launch="' . $fieldName . '" dialog-width="90%" dialog-height="70%" dialog-append-buttons="true" dialog-modal="false" dialog-title="' . t('Choose Page') . '" href="' . REL_DIR_FILES_TOOLS_REQUIRED . '/sitemap_search_selector?cID=' . $selectedCID . '" dialog-on-close="Concrete.event.fire(\'fileselectorclose\', \'{$fieldName}\');">' . t('Select Page') . '</a>';
     $html .= '&nbsp;<a href="javascript:void(0)" dialog-sender="' . $fieldName . '" data-page-selector-clear="' . $fieldName . '" class="ccm-sitemap-clear-selected-page" style="float: right; margin-top: -8px;' . $clearStyle . '"><img src="' . ASSETS_URL_IMAGES . '/icons/remove.png" style="vertical-align: middle; margin-left: 3px" /></a>';
     $html .= '<input type="hidden" data-page-selector="cID" name="' . $fieldName . '" value="' . $selectedCID . '"/>';
     $html .= '</div>';
     $html .= "<script type=\"text/javascript\">\n                   \$(function() {\n                        var ccmActivePageField;\n                        var launcher = \$('a[data-page-selector-launch=\"{$fieldName}\"]'), name = '{$fieldName}', openEvent, openEvent2;\n                        var container = \$('div[data-page-selector=\"' + name + '\"]');\n                        launcher.dialog();\n                        ConcreteEvent.bind('fileselectorclose', function(field_name) {\n                            ConcreteEvent.unbind('ConcreteSitemap.' + name);\n                            ConcreteEvent.unbind('SitemapSelectPage.' + name);\n                            ConcreteEvent.unbind('ConcreteSitemapPageSearch.' + name);\n                        });\n                        launcher.on('click', function () {\n                            var selector = \$(this),\n                                handle_select = function(e, data) {\n                                    ConcreteEvent.unbind(e);\n                                    var handle = selector.attr('data-page-selector-launch');\n                                    container.find('.ccm-summary-selected-item-label').html(data.title);\n                                    container.find('.ccm-sitemap-clear-selected-page').show();\n                                    container.find('input[data-page-selector=cID]').val(data.cID);\n                                    \$.fn.dialog.closeTop();\n                                };\n\n                            ConcreteEvent.bind('ConcreteSitemap.' + name, function (event, sitemap) {\n                                ConcreteEvent.subscribe('SitemapSelectPage.' + name, function (e, data) {\n                                    if (data.instance === sitemap) {\n                                        handle_select(e, data);\n                                    }\n                                });\n                            });\n\n                            ConcreteEvent.bind('ConcreteSitemapPageSearch.' + name, function (event, search) {\n\n                                ConcreteEvent.subscribe('SitemapSelectPage.' + name, function (e, data) {\n                                    if (data.instance === search) {\n                                        handle_select(e, data);\n                                    }\n                                });\n                            });\n                        });\n\n                        \$('a[data-page-selector-clear={$fieldName}]').click(function () {\n                            var container = \$('div[data-page-selector={$fieldName}]');\n                            container.find('.ccm-summary-selected-item-label').html('');\n                            container.find('.ccm-sitemap-clear-selected-page').hide();\n                            container.find('input[data-page-selector=cID]').val('');\n                        });\n                  });\n                  </script>";
     return $html;
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:36,代码来源:PageSelector.php

示例2: __construct

 public function __construct($config, $pluginManager, $styles)
 {
     $this->assets = ResponseAssetGroup::get();
     $this->pluginManager = $pluginManager;
     $this->config = $config;
     $this->styles = $styles;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:7,代码来源:CkeditorEditor.php

示例3: view

 public function view()
 {
     $r = ResponseAssetGroup::get();
     $r->requireAsset('core/conversation');
     $r->requireAsset('core/lightbox');
     $fileSettings = $this->getFileSettings();
     $conversation = $this->getConversationObject();
     if (is_object($conversation)) {
         $this->set('conversation', $conversation);
         if ($this->enablePosting) {
             $token = Loader::helper('validation/token')->generate('add_conversation_message');
         } else {
             $token = '';
         }
         $this->set('posttoken', $token);
         $this->set('cID', Page::getCurrentPage()->getCollectionID());
         $this->set('users', $this->getActiveUsers(true));
         $this->set('maxFilesGuest', $fileSettings['maxFilesGuest']);
         $this->set('maxFilesRegistered', $fileSettings['maxFilesRegistered']);
         $this->set('maxFileSizeGuest', $fileSettings['maxFileSizeGuest']);
         $this->set('maxFileSizeRegistered', $fileSettings['maxFileSizeRegistered']);
         $this->set('fileExtensions', $fileSettings['fileExtensions']);
         $this->set('attachmentsEnabled', $fileSettings['attachmentsEnabled']);
         $this->set('attachmentOverridesEnabled', $fileSettings['attachmentOverridesEnabled']);
     }
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:26,代码来源:controller.php

示例4: view

 public function view()
 {
     $r = ResponseAssetGroup::get();
     $r->requireAsset('core/app/editable-fields');
     $form = Loader::helper('form');
     $attribs = FileAttributeKey::getList();
     $this->set('files', $this->files);
     $this->set('attributes', $attribs);
 }
开发者ID:yakamoz-fang,项目名称:concrete,代码行数:9,代码来源:properties.php

示例5: view

 public function view()
 {
     $r = ResponseAssetGroup::get();
     $r->requireAsset('core/sitemap');
     $cnt = new SearchPagesController();
     $cnt->search();
     $this->set('searchController', $cnt);
     $result = Loader::helper('json')->encode($cnt->getSearchResultObject()->getJSONObject());
     $this->set('result', $result);
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:10,代码来源:search.php

示例6: view

 public function view()
 {
     $r = ResponseAssetGroup::get();
     $r->requireAsset('core/app/editable-fields');
     $this->populatePages();
     $form = Loader::helper('form');
     $attribs = CollectionAttributeKey::getList();
     $this->set('pages', $this->pages);
     $this->set('attributes', $attribs);
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:10,代码来源:properties.php

示例7: __construct

 public function __construct()
 {
     $fp = new Permissions(\FileSet::getGlobal());
     $tp = new Permissions();
     $this->assets = ResponseAssetGroup::get();
     $this->token = Core::make("token")->generate('editor');
     $this->setAllowFileManager($fp->canAccessFileManager());
     $this->setAllowSitemap($tp->canAccessSitemap());
     $this->pluginManager = new PluginManager();
     $this->pluginManager->selectMultiple(\Package::getByHandle('community_ckeditor')->getConfig()->get('plugins', array()));
 }
开发者ID:MrKarlDilkington,项目名称:Concrete5-CKEditor,代码行数:11,代码来源:CKEditor.php

示例8: on_start

 /**
  * On CMS boot.
  *
  * @return void
  */
 public function on_start()
 {
     $this->registerAssets();
     Events::addListener('on_before_render', function ($e) {
         $c = Page::getCurrentPage();
         if ($c instanceof Page) {
             $r = ResponseAssetGroup::get();
             if (!$c->isEditMode()) {
                 $r->requireAsset('smooth-scrolling');
             }
         }
     });
 }
开发者ID:olsgreen,项目名称:concrete-smooth-scrolling,代码行数:18,代码来源:controller.php

示例9: view

 public function view()
 {
     $r = ResponseAssetGroup::get();
     $r->requireAsset('core/app/editable-fields');
     if (isset($_REQUEST['fvID'])) {
         $fv = $this->file->getVersion(Loader::helper('security')->sanitizeInt($_REQUEST['fvID']));
         $this->set('previewMode', true);
     } else {
         $fv = $this->file->getApprovedVersion();
         $this->set('previewMode', false);
     }
     $this->set('fv', $fv);
     $this->set('form', Loader::helper('form'));
     $this->set('dateHelper', Loader::helper('date'));
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:15,代码来源:properties.php

示例10: render

 public function render($value = false)
 {
     $r = \Concrete\Core\Http\ResponseAssetGroup::get();
     $r->requireAsset('core/style-customizer');
     $strOptions = '';
     $i = 0;
     $options['inputName'] = $this->getVariable();
     if (is_object($value)) {
         $options['value'] = $value->getUrl();
     }
     $strOptions = json_encode($options);
     print '<span class="ccm-style-customizer-display-swatch-wrapper" data-image-selector="' . $this->getVariable() . '"></span>';
     print "<script type=\"text/javascript\">";
     print "\$(function() { \$('span[data-image-selector=" . $this->getVariable() . "]').concreteStyleCustomizerImageSelector({$strOptions}); });";
     print "</script>";
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:16,代码来源:ImageStyle.php

示例11: jsonSerialize

 public function jsonSerialize()
 {
     ob_start();
     print $this->renderSearchField();
     $field = ob_get_contents();
     ob_end_clean();
     $ag = ResponseAssetGroup::get();
     $assetsResponse = array();
     foreach ($ag->getAssetsToOutput() as $position => $assets) {
         foreach ($assets as $asset) {
             if (is_object($asset)) {
                 $assetsResponse[$asset->getAssetType()][] = $asset->getAssetURL();
             }
         }
     }
     return ['key' => $this->getKey(), 'label' => $this->getDisplayName(), 'element' => $field, 'data' => $this->data, 'assets' => $assetsResponse];
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:17,代码来源:AbstractField.php

示例12: __construct

 public function __construct()
 {
     $fp = FilePermissions::getGlobal();
     $tp = new TaskPermission();
     $this->assets = ResponseAssetGroup::get();
     $this->token = Core::make("token")->generate('editor');
     $this->allowFileManager = \Config::get('concrete.editor.concrete.enable_filemanager') && $fp->canAccessFileManager();
     $this->allowSitemap = \Config::get('concrete.editor.concrete.enable_sitemap') && $tp->canAccessSitemap();
     $this->pluginManager = new PluginManager();
     $this->pluginManager->register('undoredo', t('Undo/Redo'));
     $this->pluginManager->register('underline', t('Underline'));
     $this->pluginManager->register('concrete5lightbox', t('Lightbox'));
     $this->pluginManager->register('specialcharacters', t('Special Characters Palette'));
     $this->pluginManager->register('table', t('Table'));
     $this->pluginManager->register('fontfamily', t('Font Family'));
     $this->pluginManager->register('fontsize', t('Font Size'));
     $this->pluginManager->register('fontcolor', t('Font Color'));
     $this->pluginManager->selectMultiple(\Config::get('concrete.editor.plugins.selected'));
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:19,代码来源:RedactorEditor.php

示例13: defined

<?php

defined('C5_EXECUTE') or die("Access Denied.");
$ag = \Concrete\Core\Http\ResponseAssetGroup::get();
$ag->requireAsset('core/lightbox');
?>
<div id="ccm-dialog-help" class="ccm-ui">
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-8">
                <h2><?php 
echo t('Learn the basics.');
?>
</h2>
                <div class="spacer-row-2"></div>
                    <div class="row">
                    <div class="col-xs-12">
                        <div class="ccm-dialog-help-item">
                            <h4><?php 
echo t('Use the toolbar');
?>
</h4>
                            <ol class="breadcrumb">
                                <li><a data-lightbox="iframe" href="https://www.youtube.com/watch?v=VB-R71zk06U"><?php 
echo t('Watch Video');
?>
</a></li>
                                <li class="hidden-xs"><a href="#" data-launch-guide="toolbar"><?php 
echo t('Run Guide');
?>
</a></li>
开发者ID:seebaermichi,项目名称:concrete5,代码行数:31,代码来源:introduction.php

示例14: getField

 protected function getField($field)
 {
     $r = new stdClass();
     $r->field = $field;
     $searchRequest = $this->searchRequest->getSearchRequest();
     $form = Loader::helper('form');
     $wdt = Loader::helper('form/date_time');
     /* @var $wdt \Concrete\Core\Form\Service\Widget\DateTime */
     $html = '';
     switch ($field) {
         case 'date_added':
             $html .= $wdt->datetime('date_added_from', $wdt->translate('date_added_from', $searchRequest)) . t('to') . $wdt->datetime('date_added_to', $wdt->translate('date_added_to', $searchRequest));
             break;
         case 'is_active':
             $html .= $form->select('active', array('0' => t('Inactive Users'), '1' => t('Active Users')), array('style' => 'vertical-align: middle'));
             break;
         case 'group_set':
             $gsl = new GroupSetList();
             $groupsets = array();
             foreach ($gsl->get() as $gs) {
                 $groupsets[$gs->getGroupSetID()] = $gs->getGroupSetDisplayName();
             }
             $html .= $form->select('gsID', $groupsets);
             break;
         default:
             if (Loader::helper('validation/numbers')->integer($field)) {
                 $ak = UserAttributeKey::getByID($field);
                 $html .= $ak->render('search', null, true);
             }
             break;
     }
     $r->html = $html;
     $ag = ResponseAssetGroup::get();
     $r->assets = array();
     foreach ($ag->getAssetsToOutput() as $position => $assets) {
         foreach ($assets as $asset) {
             if (is_object($asset)) {
                 // have to do a check here because we might be included a dumb javascript call like i18n_js
                 $r->assets[$asset->getAssetType()][] = $asset->getAssetURL();
             }
         }
     }
     return $r;
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:44,代码来源:users.php

示例15: add_attribute

 /**
  * Retrieve attribute HTML to inject into the other view.
  */
 public function add_attribute()
 {
     $allowed = $this->assignment->getAttributesAllowedArray();
     $ak = CollectionAttributeKey::getByID($_REQUEST['akID']);
     if (is_object($ak) && in_array($ak->getAttributeKeyID(), $allowed)) {
         $obj = $this->getAttributeJSONRepresentation($ak, 'add');
         $obj->pending = true;
         $obj->assets = array();
         $ag = ResponseAssetGroup::get();
         foreach ($ag->getAssetsToOutput() as $position => $assets) {
             foreach ($assets as $asset) {
                 if (is_object($asset)) {
                     // have to do a check here because we might be included a dumb javascript call like i18n_js
                     $obj->assets[$asset->getAssetType()][] = $asset->getAssetURL();
                 }
             }
         }
         Loader::helper('ajax')->sendResult($obj);
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:23,代码来源:attributes.php


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