Class plgFinderCategories

Description

Finder adapter for Joomla Categories.

  • since: 2.5

Located in /plugins/finder/categories/categories.php (line 25)

JObject
   |
   --JEvent
      |
      --JPlugin
         |
         --FinderIndexerAdapter
            |
            --plgFinderCategories
Variable Summary
string $context
string $extension
string $layout
string $state_field
string $table
string $type_title
Method Summary
plgFinderCategories __construct (object &$subject, array $config)
JDatabaseQuery getListQuery ([mixed $sql = null])
void index (FinderIndexerResult $item, [string $format = 'html'])
boolean onFinderAfterSave (string $context, JTable $row, boolean $isNew)
boolean onFinderBeforeSave (string $context, JTable $row, boolean $isNew)
void onFinderChangeState (string $context, array $pks, integer $value)
boolean onFinderDelete (string $context, JTable $table)
boolean setup ()
Variables
string $context = 'Categories' (line 33)

The plugin identifier.

  • since: 2.5
  • access: protected

Redefinition of:
FinderIndexerAdapter::$context
The context is somewhat arbitrary but it must be unique or there will be conflicts when managing plugin/indexer state. A good best practice is to use the plugin name suffix as the context. For example, if the plugin is named 'plgFinderContent', the context could be 'Content'.
string $extension = 'com_categories' (line 41)

The extension name.

  • since: 2.5
  • access: protected

Redefinition of:
FinderIndexerAdapter::$extension
The extension name.
string $layout = 'category' (line 49)

The sublayout to use when rendering the results.

  • since: 2.5
  • access: protected

Redefinition of:
FinderIndexerAdapter::$layout
The sublayout to use when rendering the results.
string $state_field = 'published' (line 73)

The field the published state is stored in.

  • since: 2.5
  • access: protected

Redefinition of:
FinderIndexerAdapter::$state_field
The field the published state is stored in.
string $table = '#__categories' (line 65)

The table name.

  • since: 2.5
  • access: protected

Redefinition of:
FinderIndexerAdapter::$table
The table name.
string $type_title = 'Category' (line 57)

The type of content that the adapter indexes.

  • since: 2.5
  • access: protected

Redefinition of:
FinderIndexerAdapter::$type_title
The type of content the adapter indexes.

Inherited Variables

Inherited from FinderIndexerAdapter

FinderIndexerAdapter::$db
FinderIndexerAdapter::$mime
FinderIndexerAdapter::$old_access
FinderIndexerAdapter::$old_cataccess
FinderIndexerAdapter::$type_id

Inherited from JPlugin

JPlugin::$params
JPlugin::$_name
JPlugin::$_type

Inherited from JEvent

JEvent::$_subject

Inherited from JObject

JObject::$_errors
Methods
Constructor __construct (line 83)

Constructor

  • since: 2.5
  • access: public
plgFinderCategories __construct (object &$subject, array $config)
  • object &$subject: The object to observe
  • array $config: An array that holds the plugin configuration

Redefinition of:
FinderIndexerAdapter::__construct()
Method to instantiate the indexer adapter.
getListQuery (line 345)

Method to get the SQL query used to retrieve the list of content items.

  • return: A database object.
  • since: 2.5
  • access: protected
JDatabaseQuery getListQuery ([mixed $sql = null])
  • mixed $sql: A JDatabaseQuery object or null.

Redefinition of:
FinderIndexerAdapter::getListQuery()
Method to get the SQL query used to retrieve the list of content items.
getStateQuery (line 378)

Method to get a SQL query to load the published and access states for a category and section.

  • return: A database object.
  • since: 2.5
  • access: protected
JDatabaseQuery getStateQuery ()

Redefinition of:
FinderIndexerAdapter::getStateQuery()
Method to get a SQL query to load the published and access states for an article and category.
index (line 236)

Method to index an item. The item must be a FinderIndexerResult object.

  • since: 2.5
  • throws: Exception on database error.
  • access: protected
void index (FinderIndexerResult $item, [string $format = 'html'])
  • FinderIndexerResult $item: The item to index as an FinderIndexerResult object.
  • string $format: The item format

Redefinition of:
FinderIndexerAdapter::index()
Method to index an item.
onFinderAfterSave (line 130)

Method to determine if the access level of an item changed.

  • return: True on success.
  • since: 2.5
  • throws: Exception on database error.
  • access: public
boolean onFinderAfterSave (string $context, JTable $row, boolean $isNew)
  • string $context: The context of the content passed to the plugin.
  • JTable $row: A JTable object
  • boolean $isNew: If the content has just been created
onFinderBeforeSave (line 162)

Method to reindex the link information for an item that has been saved.

This event is fired before the data is actually saved so we are going to queue the item to be indexed later.

  • return: True on success.
  • since: 2.5
  • throws: Exception on database error.
  • access: public
boolean onFinderBeforeSave (string $context, JTable $row, boolean $isNew)
  • string $context: The context of the content passed to the plugin.
  • JTable $row: A JTable object
  • boolean $isNew: If the content is just about to be created
onFinderChangeState (line 190)

Method to update the link information for items that have been changed from outside the edit screen. This is fired when the item is published, unpublished, archived, or unarchived from the list view.

  • since: 2.5
  • access: public
void onFinderChangeState (string $context, array $pks, integer $value)
  • string $context: The context for the content passed to the plugin.
  • array $pks: A list of primary key ids of the content that has changed state.
  • integer $value: The value of the state that the content has been changed to.
onFinderDelete (line 100)

Method to remove the link information for items that have been deleted.

  • return: True on success.
  • since: 2.5
  • throws: Exception on database error.
  • access: public
boolean onFinderDelete (string $context, JTable $table)
  • string $context: The context of the action being performed.
  • JTable $table: A JTable object containing the record to be deleted
setup (line 328)

Method to setup the indexer to be run.

  • return: True on success.
  • since: 2.5
  • access: protected
boolean setup ()

Redefinition of:
FinderIndexerAdapter::setup()
Method to setup the adapter before indexing.

Inherited Methods

Inherited From FinderIndexerAdapter

FinderIndexerAdapter::__construct()
FinderIndexerAdapter::categoryAccessChange()
FinderIndexerAdapter::categoryStateChange()
FinderIndexerAdapter::change()
FinderIndexerAdapter::checkCategoryAccess()
FinderIndexerAdapter::checkItemAccess()
FinderIndexerAdapter::getContentCount()
FinderIndexerAdapter::getItem()
FinderIndexerAdapter::getItemMenuTitle()
FinderIndexerAdapter::getItems()
FinderIndexerAdapter::getListQuery()
FinderIndexerAdapter::getPluginType()
FinderIndexerAdapter::getStateQuery()
FinderIndexerAdapter::getTypeId()
FinderIndexerAdapter::getUpdateQueryByIds()
FinderIndexerAdapter::getUpdateQueryByTime()
FinderIndexerAdapter::getURL()
FinderIndexerAdapter::index()
FinderIndexerAdapter::itemAccessChange()
FinderIndexerAdapter::itemStateChange()
FinderIndexerAdapter::onBeforeIndex()
FinderIndexerAdapter::onBuildIndex()
FinderIndexerAdapter::onStartIndex()
FinderIndexerAdapter::pluginDisable()
FinderIndexerAdapter::reindex()
FinderIndexerAdapter::remove()
FinderIndexerAdapter::setup()
FinderIndexerAdapter::translateState()

Inherited From JPlugin

JPlugin::__construct()
JPlugin::loadLanguage()

Inherited From JEvent

JEvent::__construct()
JEvent::update()

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:52:48 -0500 by phpDocumentor 1.4.4