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


PHP Komento::onAfterEventTriggered方法代码示例

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


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

示例1: execute

	private function execute( $eventTrigger, $context = '', &$article, &$params, $page = 0 )
	{
		static $bootstrap;

		// @task: load bootstrap
		if( !$bootstrap )
		{
			$file	= JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php';

			jimport('joomla.filesystem.file');

			if( !JFile::exists( $file ) )
			{
				// missing bootstrap
				return false;
			}

			require_once( $file );
			$bootstrap = true;
		}

		if( !$this->extension )
		{
			$this->extension = JRequest::getCmd( 'option' );
		}

		// @task: trigger onAfterEventTriggered
		if( !$result = Komento::onAfterEventTriggered( __CLASS__, $eventTrigger, $this->extension, $context, $article, $params ) )
		{
			return false;
		}

		// @task: trigger onBeforeCommentify
		// if( !$result = Komento::loadApplication( $this->extension )->onBeforeCommentify( $eventTrigger, $context, $article, $params, $page ) )
		// {
		// 	return false;
		// }

		// Passing in the data
		$options			= array();
		$options['trigger']	= $eventTrigger;
		$options['context']	= $context;
		$options['params']	= $params;
		$options['page']	= $page;

		// Ready to Commentify!
		return Komento::commentify( $this->extension, $article, $options );
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:48,代码来源:komento.php

示例2: execute

 private function execute($eventTrigger, $context = 'none', &$article, &$params, $page = 0)
 {
     static $bootstrap;
     // @task: load bootstrap
     if (!$bootstrap) {
         $file = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php';
         jimport('joomla.filesystem.file');
         if (!JFile::exists($file)) {
             // missing bootstrap
             return false;
         }
         require_once $file;
         $bootstrap = true;
     }
     if (!$this->extension) {
         $this->extension = JRequest::getCmd('option');
     }
     // Fix flexicontent's mess as they are trying to reset the option=com_flexicontent to com_content.
     if (JRequest::getVar('isflexicontent')) {
         $this->extension = 'com_flexicontent';
     }
     // @task: trigger onAfterEventTriggered
     if (!($result = Komento::onAfterEventTriggered(__CLASS__, $eventTrigger, $this->extension, $context, $article, $params))) {
         return false;
     }
     // Passing in the data
     $options = array();
     $options['trigger'] = $eventTrigger;
     $options['context'] = $context;
     $options['params'] = $params;
     $options['page'] = $page;
     // Ready to Commentify!
     return Komento::commentify($this->extension, $article, $options);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:34,代码来源:komento.php


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