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


PHP Croogo::hookComponent方法代码示例

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


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

示例1: onBootstrapComplete

 /**
  * onBootstrapComplete
  */
 public function onBootstrapComplete($event)
 {
     if (CakePlugin::loaded('Comments')) {
         App::uses('Comment', 'Comments.Model');
         Croogo::hookBehavior('Node', 'Comments.Commentable');
         Croogo::hookComponent('Nodes', 'Comments.Comments');
         Croogo::hookModelProperty('Comment', 'belongsTo', array('Node' => array('className' => 'Nodes.Node', 'foreignKey' => 'foreign_key', 'counterCache' => true, 'counterScope' => array('Comment.model' => 'Node', 'Comment.status' => Comment::STATUS_APPROVED))));
     }
     if (CakePlugin::loaded('Taxonomy')) {
         Croogo::hookBehavior('Node', 'Taxonomy.Taxonomizable');
     }
     if (CakePlugin::loaded('Meta')) {
         Croogo::hookBehavior('Node', 'Meta.Meta');
     }
 }
开发者ID:saydulk,项目名称:croogo,代码行数:18,代码来源:NodesEventHandler.php

示例2:

<?php

Configure::load('SimpleCaptcha.simple_captcha');
Croogo::hookBehavior('User', 'SimpleCaptcha.Captcha');
Croogo::hookHelper('Users', 'SimpleCaptcha.Captcha');
Croogo::hookComponent('*', 'SimpleCaptcha.Captcha');
开发者ID:rchavik,项目名称:simple_captcha,代码行数:6,代码来源:simple_captcha_bootstrap.php

示例3: array

 *
 * example_routes.php will be loaded in main app/config/routes.php file.
 */
Croogo::hookRoutes('Example');
/**
 * Behavior
 *
 * This plugin's Example behavior will be attached whenever Node model is loaded.
 */
Croogo::hookBehavior('Node', 'Example.Example', array());
/**
 * Component
 *
 * This plugin's Example component will be loaded in ALL controllers.
 */
Croogo::hookComponent('*', 'Example.Example');
/**
 * Helper
 *
 * This plugin's Example helper will be loaded via NodesController.
 */
Croogo::hookHelper('Nodes', 'Example.Example');
/**
 * Admin menu (navigation)
 *
 * This plugin's admin_menu element will be rendered in admin panel under Extensions menu.
 */
Croogo::hookAdminMenu('Example');
/**
 * Admin row action
 *
开发者ID:Tamsmiranda,项目名称:croogo,代码行数:31,代码来源:example_bootstrap.php

示例4: array_merge

<?php

CroogoCache::config('switcher_default', array_merge(Configure::read('Cache.defaultConfig'), array('duration' => '+10 minutes')));
Croogo::hookBehavior('Node', 'Switcher.Switcher');
Croogo::hookComponent('*', 'Switcher.Switcher');
Croogo::hookHelper('*', 'Switcher.Switcher');
Croogo::hookAdminTab('Nodes/admin_edit', 'Switcher', 'switcher.admin_tab_node');
Croogo::hookAdminTab('Nodes/admin_add', 'Switcher', 'switcher.admin_tab_node');
CroogoNav::add('extensions.children.switcher', array('title' => 'Switcher', 'url' => '#', 'children' => array('paths' => array('title' => 'Paths', 'url' => array('admin' => true, 'plugin' => 'switcher', 'controller' => 'switcher_paths', 'action' => 'index'), 'weight' => 10), 'nodes' => array('title' => 'Nodes', 'url' => array('admin' => true, 'plugin' => 'nodes', 'controller' => 'nodes', 'action' => 'index'), 'weight' => 20))));
开发者ID:rchavik,项目名称:switcher,代码行数:9,代码来源:bootstrap.php

示例5: array_merge

<?php

$cacheConfig = array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('taxonomy')));
CroogoCache::config('croogo_types', $cacheConfig);
CroogoCache::config('croogo_vocabularies', $cacheConfig);
Croogo::hookComponent('*', 'Taxonomy.Taxonomies');
Croogo::hookHelper('*', 'Taxonomy.Taxonomies');
Croogo::mergeConfig('Translate.models.Term', array('fields' => array('title' => 'titleTranslation', 'description' => 'descriptionTranslation'), 'translateModel' => 'Taxonomy.Term'));
开发者ID:ahmadhasankhan,项目名称:croogo,代码行数:8,代码来源:bootstrap.php

示例6:

<?php

Croogo::hookComponent('*', 'Blockanywhere.Blockanywhere');
Croogo::hookHelper('Nodes', 'Blockanywhere.Block');
开发者ID:nitroouusss,项目名称:BlockAnywhere,代码行数:4,代码来源:blockanywhere_bootstrap.php

示例7: array

<?php

Croogo::hookComponent('Nodes', array('Meta.Meta' => array('priority' => 8)));
Croogo::hookHelper('*', 'Meta.Meta');
开发者ID:dlpc,项目名称:CakeWX,代码行数:4,代码来源:bootstrap.php

示例8:

<?php

Croogo::hookRoutes('J2c');
Croogo::hookComponent('*', 'J2c.J2c');
Croogo::hookAdminMenu('J2c');
开发者ID:rchavik,项目名称:j2c,代码行数:5,代码来源:j2c_bootstrap.php

示例9: array

<?php

Croogo::hookRoutes('Multiattach');
Croogo::hookComponent('Nodes', 'Multiattach.Multiattaches');
Croogo::hookBehavior('Node', 'Multiattach.Multiattach', array());
//Croogo::hookAdminTab('Nodes/admin_add', 'Attachments', 'Multiattach.admin_tab_node');
Croogo::hookAdminTab('Nodes/admin_edit', 'Attachments', 'Multiattach.admin_tab_node');
CroogoNav::add('settings.children.multiattach', array('title' => __('Multiattach'), 'url' => array('plugin' => 'Multiattach', 'controller' => 'Multiattach', 'action' => 'settings'), 'access' => array('admin')));
开发者ID:issasouktel,项目名称:Multiattach,代码行数:8,代码来源:bootstrap.php

示例10: array

<?php

Croogo::hookComponent('*', array('Guardian.Guardian' => array('priority' => 1)));
开发者ID:xintesa,项目名称:guardian,代码行数:3,代码来源: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

 *
 * Revisions_routes.php will be loaded in main app/config/routes.php file.
 */
Croogo::hookRoutes('Revisions');
/**
 * Behavior
 *
 * This plugin's Revisions behavior will be attached whenever Node model is loaded.
 */
Croogo::hookBehavior('Node', 'Revisions.Revisions', array());
/**
 * Component
 *
 * This plugin's Revisions component will be loaded in ALL controllers.
 */
Croogo::hookComponent('*', 'Revisions.Revisions');
/**
 * Helper
 *
 * This plugin's Revisions helper will be loaded via NodesController.
 */
Croogo::hookHelper('Nodes', 'Revisions.Revisions');
/**
 * Admin menu (navigation)
 *
 * This plugin's admin_menu element will be rendered in admin panel under Extensions menu.
 */
//Croogo::hookAdminMenu('Revisions');
/**
 * Admin row action
 *
开发者ID:rchavik,项目名称:revisions,代码行数:31,代码来源:revisions_bootstrap.php

示例14: array

<?php

Croogo::hookComponent('*', 'Nodes.Nodes');
Croogo::hookHelper('*', 'Nodes.Nodes');
CroogoNav::add('content', array('icon' => array('edit', 'large'), 'title' => __('Content'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'index'), 'weight' => 10, 'children' => array('list' => array('title' => __('List'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'index'), 'weight' => 10), 'create' => array('title' => __('Create'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'create'), 'weight' => 20))));
开发者ID:laiello,项目名称:plankonindia,代码行数:5,代码来源:bootstrap.php

示例15: array

<?php

Croogo::hookBehavior('Node', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesNode', 'foreignKey' => 'node_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting')))));
Croogo::hookBehavior('Block', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesBlock', 'foreignKey' => 'block_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting', 'joinTable' => 'sites_blocks')))));
Croogo::hookBehavior('Link', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesLink', 'foreignKey' => 'link_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting', 'joinTable' => 'sites_links')))));
if (Configure::read('Cakeforum.name') !== false) {
    Croogo::hookBehavior('ForumCategory', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesForumCategory', 'foreignKey' => 'forum_category_id', 'associationForeignKey' => 'site_id')))));
    Croogo::hookComponent('ForumCategories', 'Sites.SiteFilter');
}
Croogo::hookComponent('*', array('Sites.Multisite' => array('priority' => 5)));
Croogo::hookHelper('*', 'Sites.Sites');
// uncomment this line to use absolute url for menu links
// alternatively, you can hook this helper later via other plugins
// Croogo::hookHelper('*', 'Sites.SitesMenus');
Croogo::hookAdminTab('Nodes/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Nodes/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Attachments/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Attachments/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Blocks/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Blocks/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Links/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Links/admin_edit', 'Sites', 'sites.sites_selection');
$cacheConfig = Cache::config('_cake_model_');
$cacheConfig = Hash::merge($cacheConfig['settings'], array('prefix' => 'sites_', 'path' => CACHE . 'queries', 'duration' => '+1 hour'));
Cache::config('sites', $cacheConfig);
require 'admin_menu.php';
开发者ID:daniel-neumann,项目名称:sites,代码行数:26,代码来源:bootstrap.php


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