本文整理汇总了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);
}
示例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');
}
示例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);
}
示例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);
}
示例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'));
}
}
}
示例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'));
示例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'))));
示例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));
示例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'));
示例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'));
示例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'))));
示例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')));
示例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'));
示例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))));
示例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'))));