Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Adapter
+ Graphe d'héritage de Adapter:

Fonctions membres publiques

 __construct (&$subject, $config)
 
 onStartIndex ()
 
 onBeforeIndex ()
 
 onBuildIndex ()
 
 onFinderGarbageCollection ()
 
- Fonctions membres publiques hérités de CMSPlugin
 __construct (&$subject, $config=array())
 
 loadLanguage ($extension='', $basePath=JPATH_ADMINISTRATOR)
 
 setApplication (CMSApplicationInterface $application)
 
- Fonctions membres publiques hérités de DispatcherAwareInterface
 setDispatcher (DispatcherInterface $dispatcher)
 
- Fonctions membres publiques hérités de PluginInterface
 registerListeners ()
 

Fonctions membres protégées

 change ($id, $property, $value)
 
 index (Result $item)
 
 reindex ($id)
 
 remove ($id, $removeTaxonomies=true)
 
 setup ()
 
 categoryAccessChange ($row)
 
 categoryStateChange ($pks, $value)
 
 checkCategoryAccess ($row)
 
 checkItemAccess ($row)
 
 getContentCount ()
 
 getItem ($id)
 
 getItems ($offset, $limit, $query=null)
 
 getListQuery ($query=null)
 
 getPluginType ($id)
 
 getStateQuery ()
 
 getUpdateQueryByTime ($time)
 
 getUpdateQueryByIds ($ids)
 
 getTypeId ()
 
 getUrl ($id, $extension, $view)
 
 getItemMenuTitle ($url)
 
 itemAccessChange ($row)
 
 itemStateChange ($pks, $value)
 
 pluginDisable ($pks)
 
 translateState ($item, $category=null)
 
- Fonctions membres protégées hérités de CMSPlugin
 registerLegacyListener (string $methodName)
 
 registerListener (string $methodName)
 
 getApplication ()
 

Attributs protégés

 $context
 
 $extension
 
 $layout
 
 $mime
 
 $old_access
 
 $old_cataccess
 
 $type_title
 
 $type_id
 
 $db
 
 $table
 
 $indexer
 
 $state_field = 'state'
 
- Attributs protégés hérités de CMSPlugin
 $_name = null
 
 $_type = null
 
 $autoloadLanguage = false
 
 $allowLegacyListeners = true
 

Membres hérités additionnels

- Champs de données hérités de CMSPlugin
 $params = null
 

Description détaillée

Prototype adapter class for the Finder indexer package.

Depuis
2.5

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( $subject,
  $config 
)

Method to instantiate the indexer adapter.

Paramètres
object$subjectThe object to observe.
array$configAn array that holds the plugin configuration.
Depuis
2.5

Références $config, $subject, Symfony\Contracts\Service\__construct(), et Helper\addContentType().

Documentation des fonctions membres

◆ categoryAccessChange()

categoryAccessChange (   $row)
protected

Method to update index data on category access level changes

Paramètres
Table$rowA Table object
Renvoie
void
Depuis
2.5

Références $item, $items, $query, et $temp.

◆ categoryStateChange()

categoryStateChange (   $pks,
  $value 
)
protected

Method to update index data on category access level changes

Paramètres
array$pksA list of primary key ids of the content that has changed state.
integer$valueThe value of the state that the content has been changed to.
Renvoie
void
Depuis
2.5

Références $item, $items, $query, $temp, et $value.

◆ change()

change (   $id,
  $property,
  $value 
)
protected

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.

Paramètres
string$idThe ID of the item to change.
string$propertyThe property that is being changed.
integer$valueThe new value of that property.
Renvoie
boolean True on success.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $id, $item, $query, $value, et extension.

◆ checkCategoryAccess()

checkCategoryAccess (   $row)
protected

Method to check the existing access level for categories

Paramètres
Table$rowA Table object
Renvoie
void
Depuis
2.5

Références $query.

◆ checkItemAccess()

checkItemAccess (   $row)
protected

Method to check the existing access level for items

Paramètres
Table$rowA Table object
Renvoie
void
Depuis
2.5

Références $query, et $this.

◆ getContentCount()

getContentCount ( )
protected

Method to get the number of content items available to index.

Renvoie
integer The number of content items available to index.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $query, et $return.

◆ getItem()

getItem (   $id)
protected

Method to get a content item to index.

Paramètres
integer$idThe id of the content item.
Renvoie
Result A Result object.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $id, $item, $layout, $query, class, et ArrayHelper\toObject().

◆ getItemMenuTitle()

getItemMenuTitle (   $url)
protected

Method to get the page title of any menu item that is linked to the content item, if it exists and is set.

Paramètres
string$urlThe URL of the item.
Renvoie
mixed The title on success, null if not found.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $groups, $params, $query, $return, $url, $user, Factory\getUser(), et null.

◆ getItems()

getItems (   $offset,
  $limit,
  $query = null 
)
protected

Method to get a list of content items to index.

Paramètres
integer$offsetThe list offset.
integer$limitThe list limit.
QueryInterface$queryA QueryInterface object. [optional]
Renvoie
Result[] An array of Result objects.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $item, $items, $layout, $limit, Joomla\Database\Query\$offset, $query, class, et ArrayHelper\toObject().

◆ getListQuery()

getListQuery (   $query = null)
protected

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

Paramètres
mixed$queryA QueryInterface object. [optional]
Renvoie
QueryInterface A database object.
Depuis
2.5

Références $query.

◆ getPluginType()

getPluginType (   $id)
protected

Method to get the plugin type

Paramètres
integer$idThe plugin ID
Renvoie
string The plugin type
Depuis
2.5

Références $id, et $query.

◆ getStateQuery()

getStateQuery ( )
protected

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

Renvoie
QueryInterface A database object.
Depuis
2.5

Références $query.

◆ getTypeId()

getTypeId ( )
protected

Method to get the type id for the adapter content.

Renvoie
integer The numeric type id for the content.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $query.

◆ getUpdateQueryByIds()

getUpdateQueryByIds (   $ids)
protected

Method to get the query clause for getting items to update by id.

Paramètres
array$idsThe ids to load.
Renvoie
QueryInterface A database object.
Depuis
2.5

Références $query.

◆ getUpdateQueryByTime()

getUpdateQueryByTime (   $time)
protected

Method to get the query clause for getting items to update by time.

Paramètres
string$timeThe modified timestamp.
Renvoie
QueryInterface A database object.
Depuis
2.5

Références $query.

◆ getUrl()

getUrl (   $id,
  $extension,
  $view 
)
protected

Method to get the URL for the item. The URL is how we look up the link in the Finder index.

Paramètres
integer$idThe id of the item.
string$extensionThe extension the category is in.
string$viewThe view for the URL.
Renvoie
string The URL of the item.
Depuis
2.5

Références $extension, $id, et $view.

◆ index()

index ( Result  $item)
abstractprotected

Method to index an item.

Paramètres
Result$itemThe item to index as a Result object.
Renvoie
boolean True on success.
Depuis
2.5
Exceptions
Exceptionon database error.

◆ itemAccessChange()

itemAccessChange (   $row)
protected

Method to update index data on access level changes

Paramètres
Table$rowA Table object
Renvoie
void
Depuis
2.5

Références $item, $query, et $temp.

◆ itemStateChange()

itemStateChange (   $pks,
  $value 
)
protected

Method to update index data on published state changes

Paramètres
array$pksA list of primary key ids of the content that has changed state.
integer$valueThe value of the state that the content has been changed to.
Renvoie
void
Depuis
2.5

Références $item, $query, $temp, et $value.

◆ onBeforeIndex()

onBeforeIndex ( )

Method to prepare for the indexer to be run. This method will often be used to include dependencies and things of that nature.

Renvoie
boolean True on success.
Depuis
2.5
Exceptions
Exceptionon error.

Références $context, et Joomla\CMS\MVC\Model\getState().

◆ onBuildIndex()

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.

Renvoie
boolean True on success.
Depuis
2.5
Exceptions
Exceptionon error.

Références $context, $i, $items, $limit, $n, Joomla\Database\Query\$offset, Joomla\CMS\MVC\Model\getState(), et Joomla\CMS\MVC\Model\setState().

◆ onFinderGarbageCollection()

onFinderGarbageCollection ( )

Method to remove outdated index entries

Renvoie
integer
Depuis
4.2.0

Références $db, $item, $items, $query, $this, et extension.

◆ onStartIndex()

onStartIndex ( )

Method to get the adapter state and push it into the indexer.

Renvoie
void
Depuis
2.5
Exceptions
Exceptionon error.

Références $context, $total, Joomla\CMS\MVC\Model\getState(), et Joomla\CMS\MVC\Model\setState().

◆ pluginDisable()

pluginDisable (   $pks)
protected

Method to update index data when a plugin is disabled

Paramètres
array$pksA list of primary key ids of the content that has changed state.
Renvoie
void
Depuis
2.5

Références $item, $items, et $query.

◆ reindex()

reindex (   $id)
protected

Method to reindex an item.

Paramètres
integer$idThe ID of the item to reindex.
Renvoie
void
Depuis
2.5
Exceptions
Exceptionon database error.

Références $id, $item, et Taxonomy\removeOrphanNodes().

◆ remove()

remove (   $id,
  $removeTaxonomies = true 
)
protected

Method to remove an item from the index.

Paramètres
string$idThe ID of the item to remove.
bool$removeTaxonomiesRemove empty taxonomies
Renvoie
boolean True on success.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $id, $item, $items, $query, $url, extension, et Factory\getApplication().

◆ setup()

setup ( )
abstractprotected

Method to setup the adapter before indexing.

Renvoie
boolean True on success, false on failure.
Depuis
2.5
Exceptions
Exceptionon database error.

◆ translateState()

translateState (   $item,
  $category = null 
)
protected

Method to translate the native content states into states that the indexer can use.

Paramètres
integer$itemThe item state.
integer$categoryThe category state. [optional]
Renvoie
integer The translated indexer state.
Depuis
2.5

Références $category, $item, et null.

Documentation des champs

◆ $context

$context
protected

◆ $db

$db
protected

◆ $extension

$extension
protected

◆ $indexer

$indexer
protected

◆ $layout

$layout
protected

◆ $mime

$mime
protected

◆ $old_access

$old_access
protected

◆ $old_cataccess

$old_cataccess
protected

◆ $state_field

$state_field = 'state'
protected

◆ $table

$table
protected

◆ $type_id

$type_id
protected

◆ $type_title

$type_title
protected

La documentation de cette classe a été générée à partir du fichier suivant :