Source for file finder.php

Documentation is available at finder.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Plugin
  4.  * @subpackage  Content.finder
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * Finder Content Plugin
  14.  *
  15.  * @package     Joomla.Plugin
  16.  * @subpackage  Content.finder
  17.  * @since       2.5
  18.  */
  19. class PlgContentFinder extends JPlugin
  20. {
  21.     /**
  22.      * Finder after save content method
  23.      * Article is passed by reference, but after the save, so no changes will be saved.
  24.      * Method is called right after the content is saved
  25.      *
  26.      * @param   string  $context  The context of the content passed to the plugin (added in 1.6)
  27.      * @param   object  $article  A JTableContent object
  28.      * @param   bool    $isNew    If the content has just been created
  29.      *
  30.      * @since    2.5
  31.      */
  32.     public function onContentAfterSave($context$article$isNew)
  33.     {
  34.         $dispatcher    JEventDispatcher::getInstance();
  35.         JPluginHelper::importPlugin('finder');
  36.  
  37.         // Trigger the onFinderAfterSave event.
  38.         $dispatcher->trigger('onFinderAfterSave'array($context$article$isNew));
  39.     }
  40.  
  41.     /**
  42.      * Finder before save content method
  43.      * Article is passed by reference, but after the save, so no changes will be saved.
  44.      * Method is called right after the content is saved
  45.      *
  46.      * @param   string  $context  The context of the content passed to the plugin (added in 1.6)
  47.      * @param   object  $article  A JTableContent object
  48.      * @param   bool    $isNew    If the content is just about to be created
  49.      *
  50.      * @since   2.5
  51.      */
  52.     public function onContentBeforeSave($context$article$isNew)
  53.     {
  54.         $dispatcher    JEventDispatcher::getInstance();
  55.         JPluginHelper::importPlugin('finder');
  56.  
  57.         // Trigger the onFinderBeforeSave event.
  58.         $dispatcher->trigger('onFinderBeforeSave'array($context$article$isNew));
  59.     }
  60.  
  61.     /**
  62.      * Finder after delete content method
  63.      * Article is passed by reference, but after the save, so no changes will be saved.
  64.      * Method is called right after the content is saved
  65.      *
  66.      * @param   string  $context  The context of the content passed to the plugin (added in 1.6)
  67.      * @param   object  $article  A JTableContent object
  68.      *
  69.      * @since   2.5
  70.      */
  71.     public function onContentAfterDelete($context$article)
  72.     {
  73.         $dispatcher    JEventDispatcher::getInstance();
  74.         JPluginHelper::importPlugin('finder');
  75.  
  76.         // Trigger the onFinderAfterDelete event.
  77.         $dispatcher->trigger('onFinderAfterDelete'array($context$article));
  78.     }
  79.  
  80.     /**
  81.      * Finder change state content method
  82.      * Method to update the link information for items that have been changed
  83.      * from outside the edit screen. This is fired when the item is published,
  84.      * unpublished, archived, or unarchived from the list view.
  85.      *
  86.      * @param   string   $context  The context for the content passed to the plugin.
  87.      * @param   array    $pks      A list of primary key ids of the content that has changed state.
  88.      * @param   integer  $value    The value of the state that the content has been changed to.
  89.      *
  90.      * @since   2.5
  91.      */
  92.     public function onContentChangeState($context$pks$value)
  93.     {
  94.         $dispatcher    JEventDispatcher::getInstance();
  95.         JPluginHelper::importPlugin('finder');
  96.  
  97.         // Trigger the onFinderChangeState event.
  98.         $dispatcher->trigger('onFinderChangeState'array($context$pks$value));
  99.     }
  100.  
  101.     /**
  102.      * Finder change category state content method
  103.      * Article is passed by reference, but after the save, so no changes will be saved.
  104.      * Method is called right after the content is saved
  105.      *
  106.      * @param   string   $extension  The extension whose category has been updated.
  107.      * @param   array    $pks        A list of primary key ids of the content that has changed state.
  108.      * @param   integer  $value      The value of the state that the content has been changed to.
  109.      *
  110.      * @since   2.5
  111.      */
  112.     public function onCategoryChangeState($extension$pks$value)
  113.     {
  114.         $dispatcher    JEventDispatcher::getInstance();
  115.         JPluginHelper::importPlugin('finder');
  116.  
  117.         // Trigger the onFinderCategoryChangeState event.
  118.         $dispatcher->trigger('onFinderCategoryChangeState'array($extension$pks$value));
  119.     }
  120. }

Documentation generated on Tue, 19 Nov 2013 15:03:22 +0100 by phpDocumentor 1.4.3