Last active
March 2, 2018 03:20
-
-
Save CB9TOIIIA/4ca54e85861bb0478653c12d38378641 to your computer and use it in GitHub Desktop.
Обработка плагинами Joomla
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.joomla.org/Supporting_plugins_in_your_component | |
Joomla 3.8+ | |
// Process the content plugins. | |
PluginHelper::importPlugin('content'); | |
$item->text = &$item->about; | |
$dispatcher->trigger('onContentPrepare', array('com_board.item', &$item, &$item->params, $offset)); | |
Joomla 2.5+ | |
http://jdevelop.info/articles/develop-joomla/220-obrabotka-dannykh-s-pomoshchyu-plaginov-joomla-2-5 | |
$results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.article', &$item, &$this->params, $offset)); | |
Если вы делаете свой компонент или модуль к Joomla, то вы можете использовать плагины для компонента com_content: | |
$obj = new stdClass; | |
$obj->text = $text; | |
JPluginHelper::importPlugin('content'); | |
$dispatcher =& JDispatcher::getInstance(); | |
$results = $dispatcher->trigger( 'onContentPrepare', array( 'com_filer.filer', &$obj, &$params, 0 ) ); | |
echo $obj->text; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment