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


PHP Requirements::combine_files方法代码示例

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


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

示例1: include_requirements

 /**
  * Include requirements that deploynaut needs, such as javascript.
  */
 public static function include_requirements()
 {
     // JS should always go to the bottom, otherwise there's the risk that Requirements
     // puts them halfway through the page to the nearest <script> tag. We don't want that.
     Requirements::set_force_js_to_bottom(true);
     Requirements::combine_files('deploynaut.js', array('deploynaut/javascript/jquery.js', 'deploynaut/javascript/bootstrap.js', 'deploynaut/javascript/q.js', 'deploynaut/javascript/deploynaut.js', 'deploynaut/javascript/react-with-addons.min.js', 'deploynaut/javascript/deploy.min.js', 'deploynaut/javascript/bootstrap.file-input.js', 'deploynaut/thirdparty/select2/dist/js/select2.min.js', 'deploynaut/javascript/material.js'));
 }
开发者ID:antons-,项目名称:deploynaut,代码行数:10,代码来源:DNRoot.php

示例2: init

 function init()
 {
     parent::init();
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
     Requirements::customScript("jQuery(document).ready(function(\$) {\n            \$('#consulting','.marketplace-nav').addClass('current');\n        });");
     Requirements::css("themes/openstack/css/chosen.css", "screen,projection");
     Requirements::javascript(Director::protocol() . "maps.googleapis.com/maps/api/js?sensor=false");
     Requirements::combine_files('marketplace_consultants_directory_page.js', array("marketplace/code/ui/frontend/js/markerclusterer.js", "marketplace/code/ui/frontend/js/oms.min.js", "marketplace/code/ui/frontend/js/infobubble-compiled.js", "marketplace/code/ui/frontend/js/google.maps.jquery.js", "themes/openstack/javascript/chosen.jquery.min.js", "marketplace/code/ui/frontend/js/consultants.directory.page.js"));
     Requirements::customScript($this->GATrackingCode());
     $this->consultant_repository = new SapphireConsultantRepository();
     $this->region_repository = new SapphireRegionRepository();
     $this->consultants_locations_query = new ConsultantsOfficesLocationsQueryHandler();
     $this->consultants_service_query = new ConsultantsServicesQueryHandler();
     $google_geo_coding_api_key = null;
     $google_geo_coding_client_id = null;
     $google_geo_coding_private_key = null;
     if (defined('GOOGLE_GEO_CODING_API_KEY')) {
         $google_geo_coding_api_key = GOOGLE_GEO_CODING_API_KEY;
     } else {
         if (defined('GOOGLE_GEO_CODING_CLIENT_ID') && defined('GOOGLE_GEO_CODING_PRIVATE_KEY')) {
             $google_geo_coding_client_id = GOOGLE_GEO_CODING_CLIENT_ID;
             $google_geo_coding_private_key = GOOGLE_GEO_CODING_PRIVATE_KEY;
         }
     }
     $this->manager = new ConsultantManager($this->consultant_repository, new SapphireMarketPlaceVideoTypeRepository(), new SapphireMarketPlaceTypeRepository(), new SapphireOpenStackApiVersionRepository(), new SapphireOpenStackComponentRepository(), new SapphireOpenStackReleaseRepository(), new SapphireRegionRepository(), new SapphireSupportChannelTypeRepository(), new SapphireSpokenLanguageRepository(), new SapphireConfigurationManagementTypeRepository(), new SapphireConsultantServiceOfferedTypeRepository(), new ConsultantAddPolicy($this->consultant_repository, new SapphireMarketPlaceTypeRepository()), new CompanyServiceCanAddResourcePolicy(), new CompanyServiceCanAddVideoPolicy(), new ConsultantFactory(), new MarketplaceFactory(), new ValidatorFactory(), new OpenStackApiFactory(), new GoogleGeoCodingService(new SapphireGeoCodingQueryRepository(), new UtilFactory(), SapphireTransactionManager::getInstance(), $google_geo_coding_api_key, $google_geo_coding_client_id, $google_geo_coding_private_key), null, new SessionCacheService(), SapphireTransactionManager::getInstance());
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:27,代码来源:ConsultantsDirectoryPage.php

示例3: init

 public function init()
 {
     // set reading lang
     if (SiteTree::has_extension('Translatable') && !$this->getRequest()->isAjax()) {
         Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SiteTree')));
     }
     parent::init();
     Versioned::reading_stage("Stage");
     Requirements::css(CMS_DIR . '/css/screen.css');
     Requirements::customCSS($this->generatePageIconsCss());
     Requirements::combine_files('cmsmain.js', array_merge(array(CMS_DIR . '/javascript/CMSMain.js', CMS_DIR . '/javascript/CMSMain.EditForm.js', CMS_DIR . '/javascript/CMSMain.AddForm.js', CMS_DIR . '/javascript/CMSPageHistoryController.js', CMS_DIR . '/javascript/CMSMain.Tree.js', CMS_DIR . '/javascript/SilverStripeNavigator.js', CMS_DIR . '/javascript/SiteTreeURLSegmentField.js'), Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', true, true)));
     CMSBatchActionHandler::register('publish', 'CMSBatchAction_Publish');
     CMSBatchActionHandler::register('unpublish', 'CMSBatchAction_Unpublish');
     // Check legacy actions
     $legacy = $this->config()->enabled_legacy_actions;
     // Delete from live is unnecessary since we have unpublish which does the same thing
     if (in_array('CMSBatchAction_DeleteFromLive', $legacy)) {
         Deprecation::notice('4.0', 'Delete From Live is deprecated. Use Un-publish instead');
         CMSBatchActionHandler::register('deletefromlive', 'CMSBatchAction_DeleteFromLive');
     }
     // Delete action
     if (in_array('CMSBatchAction_Delete', $legacy)) {
         Deprecation::notice('4.0', 'Delete from Stage is deprecated. Use Archive instead.');
         CMSBatchActionHandler::register('delete', 'CMSBatchAction_Delete');
     } else {
         CMSBatchActionHandler::register('archive', 'CMSBatchAction_Archive');
         CMSBatchActionHandler::register('restore', 'CMSBatchAction_Restore');
     }
 }
开发者ID:phuongle2611,项目名称:silverstripe-cms,代码行数:29,代码来源:CMSMain.php

示例4: init

 public function init()
 {
     parent::init();
     // --------------------------------------------------------------------
     // CSS
     // --------------------------------------------------------------------
     Requirements::css('vendor/govtnz/swagger-ui/dist/css/reset.css', 'print,screen');
     Requirements::css('vendor/govtnz/swagger-ui/dist/css/typography.css', 'print,screen');
     Requirements::css('vendor/govtnz/swagger-ui/dist/css/print.css', 'print');
     Requirements::css('vendor/govtnz/swagger-ui/dist/css/screen.css', 'screen');
     $print = array('vendor/govtnz/swagger-ui/dist/css/reset.css', 'vendor/govtnz/swagger-ui/dist/css/typography.css', 'vendor/govtnz/swagger-ui/dist/css/print.css');
     Requirements::combine_files('swagger-print.css', $print, 'print');
     $screen = array('vendor/govtnz/swagger-ui/dist/css/reset.css', 'vendor/govtnz/swagger-ui/dist/css/typography.css', 'vendor/govtnz/swagger-ui/dist/css/screen.css');
     Requirements::combine_files('swagger-screen.css', $screen, 'screen');
     // --------------------------------------------------------------------
     // Javascript
     // --------------------------------------------------------------------
     parent::init();
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/jquery.slideto.min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/jquery.wiggle.min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/jquery.ba-bbq.min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/handlebars-2.0.0.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/underscore-min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/backbone-min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/swagger-ui.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/highlight.7.3.pack.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/marked.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/swagger-oauth.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/resources/javascript/api-swagger.js');
     Requirements::combine_files('swagger.js', array('vendor/govtnz/swagger-ui/dist/lib/jquery.slideto.min.js', 'vendor/govtnz/swagger-ui/dist/lib/jquery.wiggle.min.js', 'vendor/govtnz/swagger-ui/dist/lib/jquery.ba-bbq.min.js', 'vendor/govtnz/swagger-ui/dist/lib/handlebars-2.0.0.js', 'vendor/govtnz/swagger-ui/dist/lib/underscore-min.js', 'vendor/govtnz/swagger-ui/dist/lib/backbone-min.js', 'vendor/govtnz/swagger-ui/dist/swagger-ui.js', 'vendor/govtnz/swagger-ui/dist/lib/highlight.7.3.pack.js', 'vendor/govtnz/swagger-ui/dist/lib/marked.js', 'vendor/govtnz/swagger-ui/dist/lib/swagger-oauth.js', 'vendor/govtnz/swagger-ui/resources/javascript/api-swagger.js'));
 }
开发者ID:govtnz,项目名称:swagger-ui,代码行数:31,代码来源:SwaggerPage.php

示例5: init

    /**
     * Init
     * 	Include the javascript we will need
     *
     * @return void
     * @author Andrew Lowther <andrew.lowther@mademedia.co.uk>
     **/
    public function init()
    {
        parent::init();
        // Get the config variables we'll need
        $config = Config::inst()->get('MediaManager', 'Cloudinary');
        // Inject them into the global scope
        Requirements::customScript(<<<JS
\t\t\t;(function (window, undefined) {
\t\t\t\twindow.mediamanager = window.mediamanager || {};
\t\t\t\twindow.mediamanager.cloudinary = {
\t\t\t\t\tcloud_name: "{$config['cloud_name']}",
\t\t\t\t\tapi_key: "{$config['api_key']}"
\t\t\t\t}
\t\t\t}/)(window);
JS
);
        // Get the base javascript path
        $BaseJsPath = MEDIAMANAGER_CORE_PATH . '/javascript';
        // Combine the cloudinary files into one super file
        Requirements::combine_files('cloudinary.js', array("{$BaseJsPath}/cloudinary/js/load-image.min.js", "{$BaseJsPath}/cloudinary/js/canvas-to-blob.min.js", "{$BaseJsPath}/cloudinary/js/jquery.fileupload.js", "{$BaseJsPath}/cloudinary/js/jquery.ui.widget.js", "{$BaseJsPath}/cloudinary/js/jquery.fileupload-process.js", "{$BaseJsPath}/cloudinary/js/jquery.fileupload-image.js", "{$BaseJsPath}/cloudinary/js/jquery.fileupload-validate.js", "{$BaseJsPath}/cloudinary/js/jquery.cloudinary.js"));
        // Same again for our files
        Requirements::combine_files('mediamanager.js', array("{$BaseJsPath}/mediamanager/mediamanager.core.js"));
        // Set the cloudinary config
        \Cloudinary::config($config);
    }
开发者ID:helpfulrobot,项目名称:andrewlowther-mediamanager,代码行数:32,代码来源:MediaManagerAdmin.php

示例6: init

    public function init()
    {
        parent::init();
        // Concatenate CSS
        Requirements::combine_files('style.css', array('mysite/css/layout.css', 'mysite/css/userstyles.css'));
        // Concatenate JavaScript
        Requirements::combine_files('scripts.js', array('mysite/javascript/lib/top-nav.js', 'mysite/javascript/vanilla.js'));
        // Google Analytics
        $config = SiteConfig::current_site_config();
        $google = $config->GACode;
        $gaJS = <<<JS
            (function(i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r;
                i[r] = i[r] || function() {
                    (i[r].q = i[r].q || []).push(arguments)
                }, i[r].l = 1 * new Date();
                a = s.createElement(o), m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m)
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
            ga('create', '{$google}', 'auto');
            ga('send', 'pageview');
JS;
        Requirements::customScript($gaJS);
    }
开发者ID:digi-brains,项目名称:Silver-Stream,代码行数:26,代码来源:Page.php

示例7: init

 public function init()
 {
     parent::init();
     Requirements::combine_files('app.css', array('app/css/normalize.css', 'app/css/app.css'));
     Requirements::javascript('framework/thirdparty/jquery/jquery.js');
     Requirements::javascript('app/js/app.js');
 }
开发者ID:Cumquat,项目名称:silverstripe-orientdb-poc,代码行数:7,代码来源:AppController.php

示例8: process_combined

 /**
  * Requiring the combined js/css files- can be separate library files
  * @param array $libArr
  */
 private static function process_combined($libArr, $type)
 {
     //Debug::dump($libArr);
     $theme = self::$theme;
     //Defining library files
     foreach ($libArr as $lib => $arr) {
         $files = array();
         foreach ($arr as $str) {
             $files[] = self::replace_vars($str);
         }
         foreach ($files as $f) {
             if ($type == 'javascript') {
                 Requirements::javascript($f);
             } elseif ($type == 'css') {
                 Requirements::css($f);
             }
         }
         if ($type == 'javascript') {
             $libName = "{$theme}/{$lib}.js";
         } elseif ($type == 'css') {
             $libName = "{$theme}/{$lib}.css";
         }
         Requirements::combine_files($libName, $files);
     }
 }
开发者ID:titledk,项目名称:silverstripe-requirements-utilities,代码行数:29,代码来源:RequirementsHelper.php

示例9: init

 function init()
 {
     parent::init();
     $google_geo_coding_api_key = null;
     $google_geo_coding_client_id = null;
     $google_geo_coding_private_key = null;
     if (defined('GOOGLE_GEO_CODING_API_KEY')) {
         $google_geo_coding_api_key = GOOGLE_GEO_CODING_API_KEY;
     } else {
         if (defined('GOOGLE_GEO_CODING_CLIENT_ID') && defined('GOOGLE_GEO_CODING_PRIVATE_KEY')) {
             $google_geo_coding_client_id = GOOGLE_GEO_CODING_CLIENT_ID;
             $google_geo_coding_private_key = GOOGLE_GEO_CODING_PRIVATE_KEY;
         }
     }
     //managers
     $this->factory = new EventRegistrationRequestFactory();
     $this->event_registration_request_manager = new EventRegistrationRequestManager(new SapphireEventRegistrationRequestRepository(), new SapphireEventRepository(), $this->factory, new GoogleGeoCodingService(new SapphireGeoCodingQueryRepository(), new UtilFactory(), SapphireTransactionManager::getInstance(), $google_geo_coding_api_key, $google_geo_coding_client_id, $google_geo_coding_private_key), new SapphireEventPublishingService(), new EventValidatorFactory(), SapphireTransactionManager::getInstance());
     //js files
     Requirements::css("themes/openstack/css/chosen.css", "screen,projection");
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
     Requirements::javascript(Director::protocol() . "ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js");
     Requirements::javascript(Director::protocol() . "ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.min.js");
     Requirements::combine_files('event_registration_request_page.js', array("themes/openstack/javascript/chosen.jquery.min.js", "themes/openstack/javascript/jquery.ui.datepicker.validation.package-1.0.1/jquery.ui.datepicker.validation.js", "themes/openstack/javascript/jquery.validate.custom.methods.js", 'events/js/event.registration.request.page.js'));
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:25,代码来源:EventRegistrationRequestPage.php

示例10: init

	public function init() {
		// set reading lang
		if(Object::has_extension('SiteTree', 'Translatable') && !$this->request->isAjax()) {
			Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SiteTree')));
		}
		
		parent::init();
		
		Requirements::css(CMS_DIR . '/css/screen.css');
		
		Requirements::combine_files(
			'cmsmain.js',
			array_merge(
				array(
					CMS_DIR . '/javascript/CMSMain.js',
					CMS_DIR . '/javascript/CMSMain.EditForm.js',
					CMS_DIR . '/javascript/CMSMain.AddForm.js',
					CMS_DIR . '/javascript/CMSPageHistoryController.js',
					CMS_DIR . '/javascript/CMSMain.Tree.js',
					CMS_DIR . '/javascript/SilverStripeNavigator.js'
				),
				Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', true, true)
			)
		);

		CMSBatchActionHandler::register('publish', 'CMSBatchAction_Publish');
		CMSBatchActionHandler::register('unpublish', 'CMSBatchAction_Unpublish');
		CMSBatchActionHandler::register('delete', 'CMSBatchAction_Delete');
		CMSBatchActionHandler::register('deletefromlive', 'CMSBatchAction_DeleteFromLive');
	}
开发者ID:redema,项目名称:silverstripe-cms,代码行数:30,代码来源:CMSMain.php

示例11: MarketPlaceReviewForm

 public function MarketPlaceReviewForm()
 {
     Requirements::javascript(Director::protocol() . "ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js");
     Requirements::javascript(Director::protocol() . "ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.min.js");
     Requirements::combine_files('marketplace_review_form.js', array("themes/openstack/javascript/jquery.validate.custom.methods.js", "marketplace/code/ui/frontend/js/star-rating.min.js", "marketplace/code/ui/frontend/js/marketplace.review.js"));
     $css_files = array("marketplace/code/ui/frontend/css/star-rating.min.css", "marketplace/code/ui/frontend/css/marketplace-review.css");
     foreach ($css_files as $css_file) {
         Requirements::css($css_file);
     }
     $form = new MarketPlaceReviewForm($this, 'MarketPlaceReviewForm');
     $data = Session::get("FormInfo.Form_MarketPlaceReviewForm.data");
     $review = $this->review_repository->getReview($this->company_service_ID, Member::CurrentUserID());
     if (is_array($data)) {
         //get data from cache
         $form->loadDataFrom($data);
     } elseif ($review) {
         // get submitted review
         $form->loadDataFrom($review);
     }
     // Optional spam protection
     if (class_exists('SpamProtectorManager')) {
         SpamProtectorManager::update_form($form);
     }
     return $form;
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:25,代码来源:MarketPlaceDirectoryPage.php

示例12: updateCMSFields

 /**
  * 
  * @param FieldList $fields
  * @return void
  */
 public function updateCMSFields(FieldList $fields)
 {
     $controller = Controller::curr();
     if ($controller instanceof SecuredAssetAdmin || $controller instanceof CMSSecuredFileAddController) {
         Requirements::combine_files('securedassetsadmincmsfields.js', array(SECURED_FILES_MODULE_DIR . '/thirdparty/javascript/jquery-ui/timepicker/jquery-ui-sliderAccess.js', SECURED_FILES_MODULE_DIR . '/thirdparty/javascript/jquery-ui/timepicker/jquery-ui-timepicker-addon.min.js', SECURED_FILES_MODULE_DIR . "/javascript/SecuredFilesLeftAndMain.js"));
         Requirements::css(SECURED_FILES_MODULE_DIR . '/thirdparty/javascript/jquery-ui/timepicker/jquery-ui-timepicker-addon.min.css');
         Requirements::css(SECURED_FILES_MODULE_DIR . "/css/SecuredFilesLeftAndMain.css");
         Requirements::javascript(SECURED_FILES_MODULE_DIR . "/javascript/SecuredFilesLeftAndMain.js");
         if ($this->isFile()) {
             $buttonsSecurity = $this->showButtonsSecurity();
             $buttonsEmbargoExpiry = $this->showButtonsEmbargoExpiry();
             // Embargo field
             $embargoTypeField = new OptionSetField("EmbargoType", "", array("None" => _t('AdvancedSecuredFiles.NONENICE', "None"), "Indefinitely" => _t('AdvancedSecuredFiles.INDEFINITELYNICE', "Hide document indefinitely"), "UntilAFixedDate" => _t('AdvancedSecuredFiles.UNTILAFIXEDDATENICE', 'Hide until set date')));
             $embargoUntilDateField = DatetimeField::create('EmbargoedUntilDate', '');
             $embargoUntilDateField->getDateField()->setConfig('showcalendar', true)->setConfig('dateformat', 'dd-MM-yyyy')->setConfig('datavalueformat', 'dd-MM-yyyy')->setAttribute('readonly', true);
             $embargoUntilDateField->getTimeField()->setAttribute('readonly', true);
             // Expiry field
             $expireTypeField = new OptionSetField("ExpiryType", "", array("None" => _t('AdvancedSecuredFiles.NONENICE', "None"), "AtAFixedDate" => _t('AdvancedSecuredFiles.ATAFIXEDDATENICE', 'Set file to expire on')));
             $expiryDatetime = DatetimeField::create('ExpireAtDate', '');
             $expiryDatetime->getDateField()->setConfig('showcalendar', true)->setConfig('dateformat', 'dd-MM-yyyy')->setConfig('datavalueformat', 'dd-MM-yyyy')->setAttribute('readonly', true);
             $expiryDatetime->getTimeField()->setAttribute('readonly', true);
             $securitySettingsGroup = FieldGroup::create(FieldGroup::create($embargoTypeField, $embargoUntilDateField)->addExtraClass('embargo option-change-datetime')->setName("EmbargoGroupField"), FieldGroup::create($expireTypeField, $expiryDatetime)->addExtraClass('expiry option-change-datetime')->setName("ExpiryGroupField"));
         } else {
             $buttonsSecurity = $this->showButtonsSecurity();
             $buttonsEmbargoExpiry = '';
             $securitySettingsGroup = FieldGroup::create();
         }
         $canViewTypeField = new OptionSetField("CanViewType", "", array("Inherit" => _t('AdvancedSecuredFiles.INHERIT', "Inherit from parent folder"), "Anyone" => _t('SiteTree.ACCESSANYONE', 'Anyone'), "LoggedInUsers" => _t('SiteTree.ACCESSLOGGEDIN', 'Logged-in users'), "OnlyTheseUsers" => _t('SiteTree.ACCESSONLYTHESE', 'Only these people (choose from list)')));
         $canEditTypeField = new OptionSetField("CanEditType", "", array("Inherit" => _t('AdvancedSecuredFiles.INHERIT', "Inherit from parent folder"), "LoggedInUsers" => _t('SiteTree.ACCESSLOGGEDIN', 'Logged-in users'), "OnlyTheseUsers" => _t('SiteTree.ACCESSONLYTHESE', 'Only these people (choose from list)')));
         $groupsMap = array();
         foreach (Group::get() as $group) {
             // Listboxfield values are escaped, use ASCII char instead of &raquo;
             $groupsMap[$group->ID] = $group->getBreadcrumbs(' > ');
         }
         asort($groupsMap);
         $viewerGroupsField = ListboxField::create("ViewerGroups", _t('AdvancedSecuredFiles.VIEWERGROUPS', "Viewer Groups"))->setMultiple(true)->setSource($groupsMap)->setAttribute('data-placeholder', _t('AdvancedSecuredFiles.GroupPlaceholder', 'Click to select group'));
         $editorGroupsField = ListBoxField::create("EditorGroups", _t('AdvancedSecuredFiles.EDITORGROUPS', "Editor Groups"))->setMultiple(true)->setSource($groupsMap)->setAttribute('data-placeholder', _t('AdvancedSecuredFiles.GroupPlaceholder', 'Click to select group'));
         $securitySettingsGroup->push(FieldGroup::create($canViewTypeField, $viewerGroupsField)->addExtraClass('whocanview option-change-listbox')->setName("CanViewGroupField"));
         $securitySettingsGroup->push(FieldGroup::create($canEditTypeField, $editorGroupsField)->addExtraClass('whocanedit option-change-listbox')->setName("CanEditGroupField"));
         $securitySettingsGroup->setName("SecuritySettingsGroupField")->addExtraClass('security-settings');
         $showAdvanced = AdvancedAssetsFilesSiteConfig::is_security_enabled() || $this->isFile() && AdvancedAssetsFilesSiteConfig::is_embargoexpiry_enabled();
         if ($showAdvanced) {
             $fields->insertAfter(LiteralField::create('BottomTaskSelection', $this->owner->renderWith('componentField', ArrayData::create(array('ComponentSecurity' => AdvancedAssetsFilesSiteConfig::component_cms_icon('security'), 'ComponentEmbargoExpiry' => AdvancedAssetsFilesSiteConfig::component_cms_icon('embargoexpiry'), 'ButtonsSecurity' => $buttonsSecurity, 'ButtonsEmbargoExpiry' => $buttonsEmbargoExpiry)))), "ParentID");
             $fields->insertAfter($securitySettingsGroup, "BottomTaskSelection");
         }
     }
     if (!is_a($this->owner, "Folder") && is_a($this->owner, "File")) {
         $parentIDField = $fields->dataFieldByName("ParentID");
         if ($controller instanceof SecuredAssetAdmin) {
             $securedRoot = FileSecured::getSecuredRoot();
             $parentIDField->setTreeBaseID($securedRoot->ID);
             $parentIDField->setFilterFunction(create_function('$node', "return \$node->Secured == 1;"));
         } else {
             $parentIDField->setFilterFunction(create_function('$node', "return \$node->Secured == 0;"));
         }
         // SilverStripe core has a bug for search function now, so disable it for now.
         $parentIDField->setShowSearch(false);
     }
 }
开发者ID:helpfulrobot,项目名称:deviateltd-silverstripe-advancedassets,代码行数:64,代码来源:FileSecured.php

示例13: init

 function init()
 {
     parent::init();
     Requirements::css("marketplace/code/ui/frontend/css/marketplace.landing.css");
     Requirements::javascript(Director::protocol() . "maps.googleapis.com/maps/api/js?sensor=false");
     Requirements::combine_files('marketplace_landing.js', array("marketplace/code/ui/frontend/js/markerclusterer.js", "marketplace/code/ui/frontend/js/oms.min.js", "marketplace/code/ui/frontend/js/infobubble-compiled.js", "marketplace/code/ui/frontend/js/google.maps.jquery.js", "marketplace/code/ui/frontend/js/landing.page.js"));
     $this->public_cloud_repository = new SapphirePublicCloudRepository();
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:8,代码来源:MarketPlaceLandingPage.php

示例14: init

 function init()
 {
     parent::init();
     Requirements::css("marketplace/code/ui/frontend/css/marketplace.landing.css");
     $this->InitGoogleMapLibs();
     Requirements::combine_files('marketplace_landing.js', array("marketplace/code/ui/frontend/js/landing.page.js"));
     $this->public_cloud_repository = new SapphirePublicCloudRepository();
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:8,代码来源:MarketPlaceLandingPage.php

示例15: init

 public function init()
 {
     parent::init();
     // Include CMS styles and js
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
     Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/screen.css');
     Requirements::combine_files('cmssecurity.js', array(THIRDPARTY_DIR . '/jquery/jquery.js', THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js', THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js', FRAMEWORK_ADMIN_DIR . '/javascript/lib.js', FRAMEWORK_ADMIN_DIR . '/javascript/CMSSecurity.js'));
 }
开发者ID:aaronleslie,项目名称:aaronunix,代码行数:8,代码来源:CMSSecurity.php


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