\PlgFinderContent
Finder adapter for com_content.
Synopsis
class PlgFinderContent
extends FinderIndexerAdapter
{
- // members
- protected $context;
- protected $extension;
- protected $layout;
- protected $type_title;
- protected $table;
- protected $autoloadLanguage;
- // Inherited members from FinderIndexerAdapter
- protected $context;
- protected $extension;
- protected $layout;
- protected $mime;
- protected $old_access;
- protected $old_cataccess;
- protected $type_title;
- protected $type_id;
- protected $db;
- protected $table;
- protected FinderIndexer $indexer;
- protected $state_field;
- // Inherited members from JPlugin
- public JRegistry $params;
- protected $_name;
- protected $_type;
- protected $autoloadLanguage;
- // Inherited members from JEvent
- protected $_subject;
- // Inherited members from JObject
- protected $_errors;
- // methods
- public void onFinderCategoryChangeState()
- public boolean onFinderAfterDelete()
- public boolean onFinderAfterSave()
- public boolean onFinderBeforeSave()
- public void onFinderChangeState()
- protected void index()
- protected boolean setup()
- protected JDatabaseQuery getListQuery()
- // Inherited methods from FinderIndexerAdapter
- public void __construct()
- public boolean onStartIndex()
- public boolean onBeforeIndex()
- public boolean onBuildIndex()
- protected boolean change()
- protected abstract boolean index()
- protected boolean reindex()
- protected boolean remove()
- protected abstract boolean setup()
- protected void categoryAccessChange()
- protected void categoryStateChange()
- protected void checkCategoryAccess()
- protected void checkItemAccess()
- protected integer getContentCount()
- protected FinderIndexerResult getItem()
- protected array getItems()
- protected JDatabaseQuery getListQuery()
- protected string getPluginType()
- protected JDatabaseQuery getStateQuery()
- protected JDatabaseQuery getUpdateQueryByTime()
- protected JDatabaseQuery getUpdateQueryByIds()
- protected integer getTypeId()
- protected string getURL()
- protected mixed getItemMenuTitle()
- protected void itemAccessChange()
- protected void itemStateChange()
- protected void pluginDisable()
- protected integer translateState()
- // Inherited methods from JPlugin
- public void __construct()
- public boolean loadLanguage()
- // Inherited methods from JEvent
- public void __construct()
- public mixed update()
- // Inherited methods from JObject
- public void __construct()
- public string __toString()
- public mixed def()
- public mixed get()
- public array getProperties()
- public string getError()
- public array getErrors()
- public mixed set()
- public boolean setProperties()
- public void setError()
Hierarchy
Extends
Members
protected
- $_errors
—
array
An array of error messages or Exception objects. - $_name
—
string
The name of the plugin - $_subject
—
Event object to observe. - $_type
—
string
The plugin type - $autoloadLanguage
—
boolean
Load the language file on instantiation. - $autoloadLanguage
—
boolean
Affects constructor behavior. If true, language files will be loaded automatically. - $context
—
string
The plugin identifier. - $context
—
string
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'. - $db
—
The database object. - $extension
—
string
The extension name. - $extension
—
string
The extension name. - $indexer
—
FinderIndexer
The indexer object. - $layout
—
string
The sublayout to use when rendering the results. - $layout
—
string
The sublayout to use when rendering the results. - $mime
—
string
The mime type of the content the adapter indexes. - $old_access
—
integer
The access level of an item before save. - $old_cataccess
—
integer
The access level of a category before save. - $state_field
—
string
The field the published state is stored in. - $table
—
string
The table name. - $table
—
string
The table name. - $type_id
—
integer
The type id of the content. - $type_title
—
string
The type of content that the adapter indexes. - $type_title
—
string
The type of content the adapter indexes.
public
- $params
—
JRegistry
A JRegistry object holding the parameters for the plugin
Methods
protected
- getListQuery() — Method to get the SQL query used to retrieve the list of content items.
- index() — Method to index an item. The item must be a FinderIndexerResult object.
- setup() — Method to setup the indexer to be run.
public
- onFinderAfterDelete() — Method to remove the link information for items that have been deleted.
- onFinderAfterSave() — Method to determine if the access level of an item changed.
- onFinderBeforeSave() — Method to reindex the link information for an item that has been saved.
- onFinderCategoryChangeState() — Method to update the item link information when the item category is changed. This is fired when the item category is published or unpublished from the list view.
- onFinderChangeState() — 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.
Inherited from FinderIndexerAdapter
protected
- categoryAccessChange() — Method to update index data on category access level changes
- categoryStateChange() — Method to update index data on category access level changes
- change() — Method to change the value of a content item's property in the links table. This is used to synchronize published and access states that are changed when not editing an item directly.
- checkCategoryAccess() — Method to check the existing access level for categories
- checkItemAccess() — Method to check the existing access level for items
- getContentCount() — Method to get the number of content items available to index.
- getItem() — Method to get a content item to index.
- getItemMenuTitle() — Method to get the page title of any menu item that is linked to the content item, if it exists and is set.
- getItems() — Method to get a list of content items to index.
- getListQuery() — Method to get the SQL query used to retrieve the list of content items.
- getPluginType() — Method to get the plugin type
- getStateQuery() — Method to get a SQL query to load the published and access states for an article and category.
- getTypeId() — Method to get the type id for the adapter content.
- getURL() — Method to get the URL for the item. The URL is how we look up the link in the Finder index.
- getUpdateQueryByIds() — Method to get the query clause for getting items to update by id.
- getUpdateQueryByTime() — Method to get the query clause for getting items to update by time.
- index() — Method to index an item.
- itemAccessChange() — Method to update index data on access level changes
- itemStateChange() — Method to update index data on published state changes
- pluginDisable() — Method to update index data when a plugin is disabled
- reindex() — Method to reindex an item.
- remove() — Method to remove an item from the index.
- setup() — Method to setup the adapter before indexing.
- translateState() — Method to translate the native content states into states that the indexer can use.
public
- onBeforeIndex() — Method to prepare for the indexer to be run. This method will often be used to include dependencies and things of that nature.
- onBuildIndex() — Method to index a batch of content items. This method can be called by the indexer many times throughout the indexing process depending on how much content is available for indexing. It is important to track the progress correctly so we can display it to the user.
- onStartIndex() — Method to get the adapter state and push it into the indexer.
Inherited from JPlugin
public
- loadLanguage() — Loads the plugin language file
Inherited from JEvent
public
- update() — Method to trigger events.
Inherited from JObject
public
- __toString() — Magic method to convert the object to a string gracefully.
- def() — Sets a default value if not alreay assigned
- get() — Returns a property of the object or the default value if the property is not set.
- getError() — Get the most recent error message.
- getErrors() — Return all errors, if any.
- getProperties() — Returns an associative array of object properties.
- set() — Modifies a property of the object, creating it if it does not already exist.
- setError() — Add an error message.
- setProperties() — Set the object properties based on a named array/hash.