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


PHP event_trigger函数代码示例

本文整理汇总了PHP中event_trigger函数的典型用法代码示例。如果您正苦于以下问题:PHP event_trigger函数的具体用法?PHP event_trigger怎么用?PHP event_trigger使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: __construct

 /**
  * Constructor
  *
  * @param Request $request
  * @return CompanyProfileController
  */
 function __construct($request)
 {
     parent::__construct($request);
     $company_id = $this->request->getId('company_id');
     if ($company_id) {
         $this->active_company = Companies::findById($company_id);
     }
     // if
     if (instance_of($this->active_company, 'Company')) {
         $this->wireframe->page_actions = array();
         if (!$this->active_company->canView($this->logged_user)) {
             $this->httpError(HTTP_ERR_FORBIDDEN);
         }
         // if
         if ($this->active_company->getIsArchived() && $this->logged_user->isPeopleManager()) {
             $this->wireframe->addBreadCrumb(lang('Archive'), assemble_url('people_archive'));
         }
         // if
         $this->wireframe->addBreadCrumb($this->active_company->getName(), $this->active_company->getViewUrl());
         // Collect company tabs
         $tabs = new NamedList();
         $tabs->add('overview', array('text' => str_excerpt($this->active_company->getName(), 25), 'url' => $this->active_company->getViewUrl()));
         $tabs->add('people', array('text' => lang('People'), 'url' => $this->active_company->getViewUrl()));
         $tabs->add('projects', array('text' => lang('Projects'), 'url' => $this->active_company->getViewUrl()));
         event_trigger('on_company_tabs', array(&$tabs, &$this->logged_user, &$this->active_company));
         $this->smarty->assign(array('company_tabs' => $tabs, 'company_tab' => 'overview'));
     } else {
         $this->active_company = new Company();
     }
     // if
     $this->smarty->assign(array('active_company' => $this->active_company));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:38,代码来源:CompaniesController.class.php

示例2: daily

 /**
  * Trigger daily tasks
  *
  * @param void
  * @return null
  */
 function daily()
 {
     $this->renderText('Daily event started on ' . strftime(FORMAT_DATETIME) . '.<br />', false, false);
     event_trigger('on_daily');
     ConfigOptions::setValue('last_daily_activity', time());
     $this->renderText('Daily event finished on ' . strftime(FORMAT_DATETIME) . '.');
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:13,代码来源:CronController.class.php

示例3: index

 public function index()
 {
     $is_installed = mw_is_installed();
     if (!$is_installed) {
         if (!$is_installed) {
             $installer = new InstallController();
             return $installer->index();
         }
     } else {
         if (defined('MW_VERSION')) {
             $config_version = Config::get('microweber.version');
             if ($config_version != MW_VERSION) {
                 $this->app->update->post_update(MW_VERSION);
             }
         }
     }
     if (!defined('MW_BACKEND')) {
         define('MW_BACKEND', true);
     }
     //create_mw_default_options();
     mw()->content_manager->define_constants();
     if (defined('TEMPLATE_DIR')) {
         $load_template_functions = TEMPLATE_DIR . 'functions.php';
         if (is_file($load_template_functions)) {
             include_once $load_template_functions;
         }
     }
     event_trigger('mw.admin');
     event_trigger('mw_backend');
     $view = modules_path() . 'admin/';
     $hasNoAdmin = User::where('is_admin', 1)->limit(1)->count();
     if (!$hasNoAdmin) {
         $this->hasNoAdmin();
     }
     $view .= (!$hasNoAdmin ? 'create' : 'index') . '.php';
     $layout = new View($view);
     $layout = $layout->__toString();
     $layout = mw()->parser->process($layout);
     event_trigger('on_load');
     $layout = execute_document_ready($layout);
     event_trigger('mw.admin.header');
     $apijs_loaded = mw()->template->get_apijs_url();
     $apijs_settings_loaded = mw()->template->get_apijs_settings_url();
     $default_css = '<link rel="stylesheet" href="' . mw_includes_url() . 'default.css" type="text/css" />';
     if (!stristr($layout, $apijs_loaded)) {
         $rep = 0;
         $default_css = $default_css . "\r\n" . '<script src="' . $apijs_settings_loaded . '"></script>' . "\r\n";
         $default_css = $default_css . "\r\n" . '<script src="' . $apijs_loaded . '"></script>' . "\r\n";
         $layout = str_ireplace('<head>', '<head>' . $default_css, $layout, $rep);
     }
     $template_headers_src = mw()->template->admin_head(true);
     if ($template_headers_src != false and $template_headers_src != '') {
         $layout = str_ireplace('</head>', $template_headers_src . '</head>', $layout, $one);
     }
     return $layout;
 }
开发者ID:MenZil-Team,项目名称:microweber,代码行数:56,代码来源:AdminController.php

示例4: findPortal

 /**
  * Return portal permissions
  *
  * @param void
  * @return array
  */
 function findPortal()
 {
     static $permissions = null;
     if ($permissions === null) {
         $permissions = array();
         event_trigger('on_portal_permissions', array(&$permissions));
     }
     // if
     return $permissions;
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:16,代码来源:Permissions.class.php

示例5: get_custom_css

 public function get_custom_css()
 {
     ob_start();
     event_trigger('mw.template.print_custom_css_includes');
     $fonts_file = modules_path() . 'editor' . DS . 'fonts' . DS . 'stylesheet.php';
     if (is_file($fonts_file)) {
         include $fonts_file;
     }
     $custom_css = get_option("custom_css", "template");
     if (is_string($custom_css)) {
         print $custom_css;
     }
     event_trigger('mw.template.print_custom_css');
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:Git-Host,项目名称:microweber,代码行数:17,代码来源:Template.php

示例6: index

 /**
  * Index - main page for project exporter
  *
  * @param void
  * @return null
  */
 function index()
 {
     $is_writable = folder_is_writable(PROJECT_EXPORT_PATH);
     if (!$is_writable) {
         $this->wireframe->addPageMessage(lang("Folder <strong>:folder</strong> is not writable", array("folder" => PROJECT_EXPORT_PATH)), PAGE_MESSAGE_ERROR);
         $this->smarty->assign(array('is_writable' => false));
     } else {
         $exportable_modules = array();
         event_trigger('on_project_export', array(&$exportable_modules, &$this->active_project));
         require_once PROJECT_EXPORTER_MODULE_PATH . '/models/ProjectExporterOutputBuilder.class.php';
         $output_builder = new ProjectExporterOutputBuilder($this->active_project, $this->smarty, null);
         if (is_file($output_builder->getOutputArchivePath())) {
             $this->wireframe->addPageMessage(lang('Previous project archive already exists. You can download it using following <a href=":link"><strong>link</strong></a>', array('link' => assemble_url('project_exporter_download_export', array('project_id' => $this->active_project->getId())))), PAGE_MESSAGE_INFO);
         }
         // if
         $this->smarty->assign(array('visibility_normal_caption' => lang('Only the data clients can'), 'visibility_private_caption' => lang('All project data, including data marked as private'), 'exportable_modules' => $exportable_modules, "project" => $this->active_project, 'export_project_url' => assemble_url('project_exporter', array('project_id' => $this->active_project->getId())), 'submitted' => false, 'is_writable' => true));
         js_assign('download_url', assemble_url('project_exporter_download_export', array('project_id' => $this->active_project->getId())));
         js_assign('download_ftp_url', PROJECT_EXPORT_PATH . '/project_' . $this->active_project->getId() . '/');
     }
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:26,代码来源:ProjectExporterController.class.php

示例7: smarty_function_menu

/**
 * Render main menu
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 */
function smarty_function_menu($params, &$smarty)
{
    require SYSTEM_MODULE_PATH . '/models/menu/Menu.class.php';
    require SYSTEM_MODULE_PATH . '/models/menu/MenuGroup.class.php';
    require SYSTEM_MODULE_PATH . '/models/menu/MenuItem.class.php';
    $logged_user = $smarty->get_template_vars('logged_user');
    //BOF:task_1260
    $active_project = $smarty->get_template_vars('active_project');
    //EOF:task_1260
    $menu = new Menu();
    //BOF:task_1260
    /*
    //EOF:task_1260
    event_trigger('on_build_menu', array(&$menu, &$logged_user));
    //BOF:task_1260
    */
    event_trigger('on_build_menu', array(&$menu, &$logged_user, &$active_project));
    //EOF:task_1260
    $smarty->assign('_menu', $menu);
    return $smarty->fetch(get_template_path('_menu', null, SYSTEM_MODULE));
}
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:28,代码来源:function.menu.php

示例8: index

 /**
  * Show and process manage categories page
  *
  * @param void
  * @return null
  */
 function index()
 {
     $category_definitions = array();
     event_trigger('on_master_categories', array(&$category_definitions));
     $this->smarty->assign('category_definitions', $category_definitions);
     if ($this->request->isSubmitted()) {
         if (is_foreachable($category_definitions)) {
             foreach ($category_definitions as $category_definition) {
                 $value = $this->request->post($category_definition['name']);
                 if (!is_array($value) || count($value) < 1) {
                     $value = array(lang('General'));
                 }
                 // if
                 ConfigOptions::setValue($category_definition['name'], $value);
             }
             // foreach
         }
         // if
         flash_success('Master categories have been updated');
         $this->redirectTo('admin');
     }
     // if
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:29,代码来源:CategoriesAdminController.class.php

示例9: index

 /**
  * Show administration index page
  *
  * @param void
  * @return null
  */
 function index()
 {
     if (isset($this->application->version)) {
         $version = $this->application->version;
     } else {
         $version = '1.0';
     }
     // if
     $admin_sections = array(ADMIN_SECTION_SYSTEM => null, ADMIN_SECTION_MAIL => null, ADMIN_SECTION_TOOLS => null, ADMIN_SECTION_OTHER => null);
     event_trigger('on_admin_sections', array(&$admin_sections));
     $original_licence_key = LICENSE_KEY;
     $license_id = '';
     $license_group_length = 6;
     for ($x = 0; $x < ceil(strlen($original_licence_key) / $license_group_length); $x++) {
         $license_id .= substr($original_licence_key, $x * $license_group_length, $license_group_length) . '-';
     }
     // for
     $license_id .= LICENSE_UID;
     $support_url = 'https://www.activecollab.com/support/index.php?pg=request';
     $support_url .= '&amp;acinfo[ac_version]=' . urlencode($version);
     $support_url .= '&amp;acinfo[ac_version]=' . urlencode($version);
     $support_url .= '&amp;acinfo[php_version]=' . urlencode(PHP_VERSION);
     $support_url .= '&amp;acinfo[mysql_version]=' . urlencode(db_version());
     $support_url .= '&amp;acinfo[license_key]=' . urlencode($original_licence_key);
     $support_url .= '&amp;acinfo[license_type]=' . urlencode(LICENSE_PACKAGE);
     $support_url .= '&amp;acinfo[license_uid]=' . urlencode(LICENSE_UID);
     $support_url .= '&amp;acinfo[license_branding_removed]=' . urlencode(LICENSE_COPYRIGHT_REMOVED);
     $support_url .= '&amp;acinfo[license_url]=' . urlencode(LICENSE_URL);
     $support_url .= '&amp;acinfo[encoded_license_id]=' . urlencode($license_id);
     $user_id = LICENSE_UID;
     $license_key = LICENSE_KEY;
     $update_to_corporate_url = LICENSE_PACKAGE == 'corporate' ? false : "http://www.activecollab.com/user/{$user_id}/upgrade-to-corporate?license_key={$license_key}";
     $branding_removal_url = LICENSE_COPYRIGHT_REMOVED === true ? false : "http://www.activecollab.com/user/{$user_id}/purchase-branding-removal?license_key={$license_key}";
     $extend_support_url = "http://www.activecollab.com/user/{$user_id}/extend-support?license_key={$license_key}";
     $this->smarty->assign(array('ac_version' => $version, 'admin_sections' => $admin_sections, 'php_version' => PHP_VERSION, 'mysql_version' => db_version(), 'license_user_id' => LICENSE_UID, 'licence_type' => LICENSE_PACKAGE, 'licence_url' => LICENSE_URL, 'licence_expires' => new DateValue(LICENSE_EXPIRES), 'license_branding_removed' => LICENSE_COPYRIGHT_REMOVED, 'license_id' => $license_id, 'support_url' => $support_url, 'upgrade_to_corporate_url' => LICENSE_PACKAGE === 'corporate' ? false : "http://www.activecollab.com/user/{$user_id}/upgrade-to-corporate?license_key={$license_key}", 'branding_removal_url' => LICENSE_COPYRIGHT_REMOVED === true ? false : "http://www.activecollab.com/user/{$user_id}/purchase-branding-removal?license_key={$license_key}", 'extend_support_url' => "http://www.activecollab.com/user/{$user_id}/extend-support?license_key={$license_key}"));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:42,代码来源:AdminController.class.php

示例10: mw_includes_url

                    if (mw.helpinfo != undefined) {
                        mw.cookie.set('helpinfo', false, 4380);
                        $(".helpinfo_helper").fadeOut();
                    }
                });
            });
            mw.require("<?php 
    print mw_includes_url();
    ?>
css/ui.css");
        </script>
        <?php 
}
?>
        <?php 
event_trigger('admin_head');
?>
        </head>
        <body  class="is_admin loading view-<?php 
print mw()->url_manager->param('view');
?>
 action-<?php 
print mw()->url_manager->param('action');
?>
">
<?php 
$last_page_front = session_get('last_content_id');
if ($last_page_front == false) {
    if (isset($_COOKIE['last_page'])) {
        $last_page_front = $_COOKIE['last_page'];
    }
开发者ID:newaltcoin,项目名称:microweber,代码行数:31,代码来源:header.php

示例11: getQuickOptions

 /**
  * Return quick options
  *
  * @param User $user
  * @return NamedList
  */
 function getQuickOptions($user)
 {
     if (!isset($this->quick_options[$user->getId()])) {
         $options = new NamedList();
         if ($this->canEdit($user)) {
             $options->add('edit', array('text' => lang('Change Details'), 'url' => $this->getEditUrl()));
             $options->add('edit_logo', array('text' => lang('Change Logo'), 'url' => $this->getEditLogoUrl()));
         }
         // if
         // Additional
         event_trigger('on_company_quick_options', array(&$this, &$options, &$user));
         $this->quick_options[$user->getId()] = $options;
     }
     // if
     return $this->quick_options[$user->getId()];
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:22,代码来源:Company.class.php

示例12: post_update

 function post_update()
 {
     $this->_log_msg('Applying post update actions');
     $system_refresh = new \Microweber\Install\DbInstaller();
     $system_refresh->createSchema();
     //$system_refresh->run();
     if (!ini_get('safe_mode')) {
         if (!strstr(INI_SYSTEM_CHECK_DISABLED, 'ini_set')) {
             ini_set("set_time_limit", 0);
         }
         if (!strstr(INI_SYSTEM_CHECK_DISABLED, 'set_time_limit')) {
             set_time_limit(0);
         }
     }
     mw()->cache_manager->delete('db');
     mw()->cache_manager->delete('update/global');
     mw()->cache_manager->delete('elements/global');
     mw()->cache_manager->delete('templates');
     mw()->cache_manager->delete('modules/global');
     mw()->cache_manager->clear();
     scan_for_modules();
     scan_for_elements();
     mw()->layouts_manager->scan();
     event_trigger('mw_db_init_default');
     event_trigger('mw_db_init_modules');
     event_trigger('mw_db_init');
 }
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:27,代码来源:UpdateManager.php

示例13: extended_save_categories

 function extended_save_categories($params)
 {
     if ($this->extended_save_has_permission()) {
         event_trigger('mw.database.extended_save_categories', $params);
         $data_to_save = $params;
         $cats_modified = false;
         if (isset($data_to_save['categories'])) {
             if (is_string($data_to_save['categories'])) {
                 $data_to_save['categories'] = explode(',', $data_to_save['categories']);
             }
             $categories = $data_to_save['categories'];
             if (is_array($categories)) {
                 $save_cat_item = array();
                 $save_cat_item['rel_type'] = $data_to_save['table'];
                 $save_cat_item['rel_id'] = $data_to_save['id'];
                 $check = $this->app->category_manager->get_items($save_cat_item);
                 if (is_array($check) and !empty($check)) {
                     foreach ($check as $item) {
                         if (!in_array($item['parent_id'], $categories)) {
                             $this->app->category_manager->delete_item($item['id']);
                         }
                     }
                 }
                 $cats_modified = true;
                 foreach ($categories as $category) {
                     if ((is_string($category) or is_int($category)) and intval($category) != 0) {
                         $save_cat_item = array();
                         $save_cat_item['rel_type'] = $data_to_save['table'];
                         $save_cat_item['rel_id'] = $data_to_save['id'];
                         $save_cat_item['parent_id'] = $category;
                         $check = $this->app->category_manager->get_items($save_cat_item);
                         if ($check == false) {
                             $this->app->category_manager->save_item($save_cat_item);
                         }
                     } elseif (is_array($category)) {
                         $cat_id = false;
                         if (isset($category['title']) and isset($data_to_save['id'])) {
                             $save_cat_item = array();
                             $save_cat_item['single'] = true;
                             $save_cat_item['rel_type'] = $data_to_save['table'];
                             if (isset($data_to_save['parent'])) {
                                 $save_cat_item['rel_id'] = $data_to_save['parent'];
                             } else {
                                 $save_cat_item['rel_id'] = $data_to_save['id'];
                             }
                             $save_cat_item['title'] = $category['title'];
                             if (isset($category['parent_id'])) {
                                 $save_cat_item['parent_id'] = $category['parent_id'];
                             }
                             $check = $this->app->category_manager->get($save_cat_item);
                             if ($check == false) {
                                 $category['parent_id'] = $cat_id = $this->app->category_manager->save($save_cat_item);
                             } elseif (isset($check['id'])) {
                                 $cat_id = $check['id'];
                                 $category['parent_id'] = $cat_id;
                             }
                         }
                         if ($cat_id != false) {
                             $save_cat_item = array();
                             $save_cat_item['rel_type'] = $data_to_save['table'];
                             $save_cat_item['rel_id'] = $data_to_save['id'];
                             if (isset($category['parent_id'])) {
                                 $save_cat_item['parent_id'] = $category['parent_id'];
                             }
                             $check = $this->app->category_manager->get_items($save_cat_item);
                             if ($check == false) {
                                 $save_item = $this->app->category_manager->save_item($save_cat_item);
                             }
                         }
                     }
                 }
             }
         }
         if ($cats_modified != false) {
             $this->app->cache_manager->delete('categories');
             $this->app->cache_manager->delete('categories_items');
         }
     }
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:79,代码来源:ExtendedSave.php

示例14: event_trigger

                var h = $(this).dataset("action");
                mw.toolbar.ComponentsShow(h);
            });

            $(mwd.querySelectorAll('.edit')).each(function(){
              mw.linkTip.init(this);
            })
        });





    </script>
<?php 
    event_trigger('live_edit_toolbar_end');
    include mw_includes_path() . 'toolbar' . DS . "design.php";
} else {
    ?>
<script>
        previewHTML = function (html, index) {
            mw.$('.edit').eq(index).html(html);
        }
        window.onload = function () {
            if (window.opener !== null) {
                window.opener.mw.$('.edit').each(function (i) {
                    var html = $(this).html();
                    self.previewHTML(html, i);
                });
            }
        }
开发者ID:minhkiller,项目名称:microweber,代码行数:31,代码来源:toolbar.php

示例15: _e

    ?>
semi_hidden<?php 
}
?>
">
                  <div style="height: 55px;"><span>
                    <?php 
_e("Successfully Completed");
?>
                    </span></div>
                </div>
              </div>
            </div>
          </div>
          <?php 
event_trigger('mw.ui.admin.shop.order.edit.status.after', $ord);
?>
          <?php 
$edit_order_custom_items = mw()->ui->module('mw.ui.admin.shop.order.edit.status.after');
?>
          <?php 
if (!empty($edit_order_custom_items)) {
    ?>
          <?php 
    foreach ($edit_order_custom_items as $item) {
        ?>
          <?php 
        $view = isset($item['view']) ? $item['view'] : false;
        ?>
          <?php 
        $link = isset($item['link']) ? $item['link'] : false;
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:edit_order.php


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