當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Croogo::mergeConfig方法代碼示例

本文整理匯總了PHP中Croogo::mergeConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP Croogo::mergeConfig方法的具體用法?PHP Croogo::mergeConfig怎麽用?PHP Croogo::mergeConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Croogo的用法示例。


在下文中一共展示了Croogo::mergeConfig方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onSetupLinkChooser

 /**
  * Setup Link chooser values
  *
  * @return void
  */
 public function onSetupLinkChooser($event)
 {
     $linkChoosers = array();
     $linkChoosers['Images'] = array('title' => 'Images', 'description' => 'Attachments with an image mime type.', 'url' => array('plugin' => 'file_manager', 'controller' => 'attachments', 'action' => 'index', '?' => array('chooser_type' => 'image', 'chooser' => 1, 'KeepThis' => true, 'TB_iframe' => true, 'height' => 400, 'width' => 600)));
     $linkChoosers['Files'] = array('title' => 'Files', 'description' => 'Attachments with other mime types, ie. pdf, xls, doc, etc.', 'url' => array('plugin' => 'file_manager', 'controller' => 'attachments', 'action' => 'index', '?' => array('chooser_type' => 'file', 'chooser' => 1, 'KeepThis' => true, 'TB_iframe' => true, 'height' => 400, 'width' => 600)));
     Croogo::mergeConfig('Menus.linkChoosers', $linkChoosers);
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:12,代碼來源:FileManagerEventHandler.php

示例2: __construct

 public function __construct($options = array())
 {
     $this->_config = $options;
     $this->_providerId = $this->_providerId($options);
     Croogo::mergeConfig('SocialitesProviderRegistry', array($this->_providerId => $this->getProviderClass()));
     $this->_Socialite = ClassRegistry::init('Socialites.Socialite');
     $this->_Socialite->recursive = -1;
     $this->_Socialite->contain('User');
 }
開發者ID:xintesa,項目名稱:socialites,代碼行數:9,代碼來源:SocialitesBaseEventHandler.php

示例3: onSetupLinkChooser

 /**
  * Setup Link chooser values
  *
  * @return void
  */
 public function onSetupLinkChooser($event)
 {
     $Type = ClassRegistry::init('Taxonomy.Type');
     $types = $Type->find('all', array('fields' => array('alias', 'title', 'description')));
     $linkChoosers = array();
     foreach ($types as $type) {
         $linkChoosers[$type['Type']['title']] = array('title' => $type['Type']['title'], 'description' => $type['Type']['description'], 'url' => array('plugin' => 'nodes', 'controller' => 'nodes', 'action' => 'index', '?' => array('type' => $type['Type']['alias'], 'chooser' => 1, 'KeepThis' => true, 'TB_iframe' => true, 'height' => 400, 'width' => 600)));
     }
     Croogo::mergeConfig('Menus.linkChoosers', $linkChoosers);
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:15,代碼來源:NodesEventHandler.php

示例4: onSetupLinkChooser

 /**
  * Setup Link chooser values
  *
  * @return void
  */
 public function onSetupLinkChooser($event)
 {
     $this->Vocabulary = ClassRegistry::init('Taxonomy.Vocabulary');
     $vocabularies = $this->Vocabulary->find('all', array('joins' => array(array('table' => 'types_vocabularies', 'alias' => 'TypesVocabulary', 'conditions' => 'Vocabulary.id = TypesVocabulary.vocabulary_id'), array('table' => 'types', 'alias' => 'Type', 'conditions' => 'TypesVocabulary.type_id = Type.id'))));
     $linkChoosers = array();
     foreach ($vocabularies as $vocabulary) {
         foreach ($vocabulary['Type'] as $type) {
             $title = $type['title'] . ' ' . $vocabulary['Vocabulary']['title'];
             $linkChoosers[$title] = array('description' => $vocabulary['Vocabulary']['description'], 'url' => array('plugin' => 'taxonomy', 'controller' => 'terms', 'action' => 'index', $vocabulary['Vocabulary']['id'], '?' => array('type' => $type['alias'], 'chooser' => 1, 'KeepThis' => true, 'TB_iframe' => true, 'height' => 400, 'width' => 600)));
         }
     }
     Croogo::mergeConfig('Menus.linkChoosers', $linkChoosers);
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:18,代碼來源:TaxonomiesEventHandler.php

示例5: beforeRender

 /**
  * beforeRender
  *
  * @param string $viewFile
  * @return void
  */
 public function beforeRender($viewFile)
 {
     if (is_array(Configure::read('Wysiwyg.actions'))) {
         $this->actions = Hash::merge($this->actions, Configure::read('Wysiwyg.actions'));
     }
     $action = Inflector::camelize($this->params['controller']) . '/' . $this->params['action'];
     if ($action === 'MoxieManager/admin_index') {
         $this->Html->script(array('/MoxieManager/js/moxman.loader.min'), array('inline' => false));
     } elseif (Configure::read('Writing.wysiwyg') && isset($this->actions[$action])) {
         $this->_CroogoPlugin = new CroogoPlugin();
         if ($this->_CroogoPlugin->isActive('ckeditor')) {
             Configure::write('Js.Wysiwyg.attachmentsPath', Router::url('/MoxieManager/ckeditor.php'));
         } elseif ($this->_CroogoPlugin->isActive('tinymce')) {
             $this->Html->scriptBlock('$(document).ready(function() {
       tinymce.PluginManager.load("moxiemanager", "/MoxieManager/plugin.min.js");
     });', array('inline' => false));
             Croogo::mergeConfig('Tinymce.defaults', array('extra_plugins' => 'moxiemanager'));
         }
     }
 }
開發者ID:vidalweb,項目名稱:MoxieManager,代碼行數:26,代碼來源:MoxieManagerHelper.php

示例6: array_merge

<?php

CroogoCache::config('croogo_blocks', array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('blocks'))));
Croogo::hookComponent('*', array('Blocks.Blocks' => array('priority' => 5)));
Croogo::hookHelper('*', 'Blocks.Regions');
Croogo::mergeConfig('Translate.models.Block', array('fields' => array('title' => 'titleTranslation', 'body' => 'bodyTranslation'), 'translateModel' => 'Blocks.Block'));
開發者ID:saydulk,項目名稱:croogo,代碼行數:6,代碼來源:bootstrap.php

示例7: array

<?php

Croogo::hookRoutes('Emarketing');
// Croogo::hookHelper('Attachments', 'Tinymce.Tinymce');
/**
 * Admin menu (navigation)
 */
CroogoNav::add('emarketing', array('title' => __('Emarketing'), 'icon' => 'envelope large', 'url' => array('admin' => true, 'plugin' => 'emarketing', 'controller' => 'mailings', 'action' => 'index'), 'weight' => 30));
Croogo::mergeConfig('Wysiwyg.actions', array('Mailings/admin_add' => array(array('elements' => 'MailingBody', 'preset' => 'standard')), 'Mailings/admin_edit' => array(array('elements' => 'MailingBody', 'preset' => 'standard'))));
開發者ID:progerio,項目名稱:plugins,代碼行數:9,代碼來源:bootstrap.php

示例8: spl_autoload_register

    return;
}
spl_autoload_register(function ($class) {
    $defaultPath = CakePlugin::path('Assets') . 'Vendor' . DS . 'Gaufrette' . DS . 'src' . DS;
    $base = Configure::read('Assets.GaufretteLib');
    if (empty($base)) {
        $base = $defaultPath;
    }
    $class = str_replace('\\', DS, $class);
    if (file_exists($base . $class . '.php')) {
        include $base . $class . '.php';
    }
});
Configure::write('Wysiwyg.attachmentBrowseUrl', array('plugin' => 'assets', 'controller' => 'assets_attachments', 'action' => 'browse'));
Configure::write('Wysiwyg.uploadsPath', '');
Croogo::mergeConfig('Wysiwyg.actions', array('AssetsAttachments/admin_browse'));
App::uses('StorageManager', 'Assets.Lib');
StorageManager::config('LocalAttachment', array('description' => 'Local Attachment', 'adapterOptions' => array(WWW_ROOT . 'assets', true), 'adapterClass' => '\\Gaufrette\\Adapter\\Local', 'class' => '\\Gaufrette\\Filesystem'));
StorageManager::config('LegacyLocalAttachment', array('description' => 'Local Attachment (Legacy)', 'adapterOptions' => array(WWW_ROOT . 'uploads', true), 'adapterClass' => '\\Gaufrette\\Adapter\\Local', 'class' => '\\Gaufrette\\Filesystem'));
// TODO: make this configurable via backend
$actions = array('Nodes/admin_edit', 'Blocks/admin_edit', 'Types/admin_edit');
$tabTitle = __d('assets', 'Assets');
foreach ($actions as $action) {
    list($controller, ) = explode('/', $action);
    Croogo::hookAdminTab($action, $tabTitle, 'Assets.admin/asset_list');
    Croogo::hookHelper($controller, 'Assets.AssetsAdmin');
}
// TODO: make this configurable via backend
$models = array('Block', 'Node', 'Type');
foreach ($models as $model) {
    Croogo::hookBehavior($model, 'Assets.LinkedAssets', array('priority' => 9));
開發者ID:maps90,項目名稱:Assets,代碼行數:31,代碼來源:bootstrap.php

示例9: array_merge

<?php

$cacheConfig = array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('nodes')));
CroogoCache::config('nodes', $cacheConfig);
CroogoCache::config('nodes_view', $cacheConfig);
CroogoCache::config('nodes_promoted', $cacheConfig);
CroogoCache::config('nodes_term', $cacheConfig);
CroogoCache::config('nodes_index', $cacheConfig);
Croogo::hookApiComponent('Nodes', 'Nodes.NodeApi');
Croogo::hookComponent('*', 'Nodes.Nodes');
Croogo::hookHelper('*', 'Nodes.Nodes');
// Configure Wysiwyg
Croogo::mergeConfig('Wysiwyg.actions', array('Nodes/admin_add' => array(array('elements' => 'NodeBody')), 'Nodes/admin_edit' => array(array('elements' => 'NodeBody')), 'Translate/admin_edit' => array(array('elements' => 'NodeBody'))));
Croogo::mergeConfig('Translate.models.Node', array('fields' => array('title' => 'titleTranslation', 'excerpt' => 'excerptTranslation', 'body' => 'bodyTranslation'), 'translateModel' => 'Nodes.Node'));
開發者ID:saydulk,項目名稱:croogo,代碼行數:14,代碼來源:bootstrap.php

示例10: array_merge

<?php

CroogoCache::config('contacts_view', array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('contacts'))));
Croogo::mergeConfig('Translate.models.Contact', array('fields' => array('title' => 'titleTranslation', 'body' => 'bodyTranslation'), 'translateModel' => 'Contacts.Contact'));
開發者ID:saydulk,項目名稱:croogo,代碼行數:4,代碼來源:bootstrap.php

示例11: array

<?php

Croogo::hookComponent('Nodes', 'Cforms.Cforms');
Croogo::hookHelper('Nodes', 'Cforms.CformCss');
// Configure Wysiwyg
Croogo::mergeConfig('Wysiwyg.actions', array('Cforms/admin_edit' => array(array('elements' => 'CformSuccessMessage'), array('elements' => 'CformAutoConfirmation'))));
開發者ID:Wouter0100,項目名稱:croogo-cakeforms,代碼行數:6,代碼來源:bootstrap.php

示例12: array

<?php

CroogoNav::add('webshop-customer-dashboard', 'users', array('title' => __d('webshop_customer_users', 'Users'), 'url' => array('prefix' => 'panel', 'plugin' => 'webshop_customer_users', 'controller' => 'customer_users', 'action' => 'index')));
Croogo::hookBehavior('Customer', 'WebshopCustomerUsers.CustomerWithUsers');
Croogo::hookComponent('*', 'WebshopCustomerUsers.CustomerUsers');
Croogo::mergeConfig('Webshop.customer_access_providers', array('CustomerUsers' => array('provider' => 'WebshopCustomerUsers.CustomerUser')));
開發者ID:cvo-technologies,項目名稱:webshop-customer-users,代碼行數:6,代碼來源:bootstrap.php

示例13: array_merge

<?php

CroogoCache::config('croogo_menus', array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('menus'))));
Croogo::hookComponent('*', 'Menus.Menus');
Croogo::hookHelper('*', 'Menus.Menus');
Croogo::mergeConfig('Translate.models.Link', array('fields' => array('title' => 'titleTranslation', 'description' => 'descriptionTranslation'), 'translateModel' => 'Menus.Link'));
開發者ID:saydulk,項目名稱:croogo,代碼行數:6,代碼來源:bootstrap.php

示例14: array_merge

<?php

$cacheConfig = array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('nodes')));
CroogoCache::config('nodes', $cacheConfig);
CroogoCache::config('nodes_view', $cacheConfig);
CroogoCache::config('nodes_promoted', $cacheConfig);
CroogoCache::config('nodes_term', $cacheConfig);
CroogoCache::config('nodes_index', $cacheConfig);
Croogo::hookComponent('*', 'Nodes.Nodes');
Croogo::hookHelper('*', 'Nodes.Nodes');
// Configure Wysiwyg
Croogo::mergeConfig('Wysiwyg.actions', array('Nodes/admin_add' => array(array('elements' => 'NodeBody')), 'Nodes/admin_edit' => array(array('elements' => 'NodeBody')), 'Translate/admin_edit' => array(array('elements' => 'NodeBody'))));
CroogoNav::add('content', array('icon' => array('edit', 'large'), 'title' => __d('croogo', 'Content'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'index'), 'weight' => 10, 'children' => array('list' => array('title' => __d('croogo', 'List'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'index'), 'weight' => 10), 'create' => array('title' => __d('croogo', 'Create'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'create'), 'weight' => 20))));
開發者ID:Demired,項目名稱:CakeWX,代碼行數:13,代碼來源:bootstrap.php

示例15: array

<?php

Croogo::hookRoutes('Revista');
CroogoNav::add('revista', array('icon' => array('tags', 'large'), 'title' => __('Revista'), 'weight' => 30, 'url' => array('admin' => true, 'plugin' => 'revista', 'controller' => 'editions', 'action' => 'index')));
Croogo::mergeConfig('Wysiwyg.actions', array('Editions/admin_add' => array(array('elements' => 'EditionIntro', 'preset' => 'standard'), array('elements' => 'EditionBanner', 'preset' => 'standard'), array('elements' => 'EditionDescricao', 'preset' => 'basic')), 'Artigos/admin_add' => array(array('elements' => 'ArtigoResumo', 'preset' => 'basic'), array('elements' => 'ArtigoAutores', 'preset' => 'basic'))));
開發者ID:progerio,項目名稱:plugins,代碼行數:5,代碼來源:bootstrap.php


注:本文中的Croogo::mergeConfig方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。