PHP Class MetaModels\BackendIntegration\SearchablePages

Afficher le fichier Open project: metamodels/core

Protected Properties

Свойство Type Description
$configs array A list with all settings from the database.
$foundPages array A list with all pages found by Contao.

Méthodes publiques

Méthode Description
__construct ( ) Construct.
addPages ( array $pages, integer | null $rootPage = null, boolean | null $fromSiteMap = false, string | null $language = null ) : array Start point for the hook getSearchablePages.
setFilterParameters ( string $filterId, string[] $presets, string[] $values ) : array Set parameters.

Méthodes protégées

Méthode Description
getAttributeFactory ( ) : MetaModels\Attribute\IAttributeFactory Get the attribute Factory.
getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface Get the event Dispatcher.
getFilterSettings ( mixed $identifier ) : MetaModels\Filter\Setting\ICollection Get a filter based on the id.
getJumpTosFor ( array $availableLanguages, MetaModels\IMetaModel $metaModels, MetaModels\Filter\IFilter $filter, MetaModels\Render\Setting\ICollection $view, string | null $rootPage = null ) : array Get the list of jumpTos based on the items.
getLanguage ( string $singleLanguage, MetaModels\IMetaModel $metaModels ) : string[] Get the language.
getMetaModel ( string | integer $identifier, boolean $ignoreError ) : MetaModels\IMetaModel | null Get a MetaModels by name or id.
getMetaModelsFactory ( ) : MetaModels\IFactory Get the MetaModels Factory.
getServiceContainer ( ) : MetaModels\IMetaModelsServiceContainer Retrieve the service container.
getView ( string | integer $identifier, integer $view ) : MetaModels\Render\Setting\ICollection Get the view for a MetaModels.
removeEmptyDetailPages ( array $jumpTos ) : void Remove all empty detail pages.

Private Methods

Méthode Description
getBaseUrl ( string[] $pageDetails, null | string $path = null, boolean $ignoreSSL = false ) : ContaoCommunityAlliance\UrlBuilder\UrlBuilder Get the base URL.
getMetaModelsPages ( array $config, string | null $rootPage = null, string | null $language = null ) : void Get a MetaModels, a filter and a renderSetting. Get all items based on the filter and build the jumpTo urls.

Method Details

__construct() public méthode

Construct.
public __construct ( )

addPages() public méthode

Start point for the hook getSearchablePages.
See also: RebuildIndex::run()
See also: Automator::generateSitemap()
public addPages ( array $pages, integer | null $rootPage = null, boolean | null $fromSiteMap = false, string | null $language = null ) : array
$pages array List with all pages.
$rootPage integer | null ID of the root page.
$fromSiteMap boolean | null True when called from sitemap generator, null otherwise.
$language string | null The current language.
Résultat array

getAttributeFactory() protected méthode

Get the attribute Factory.
protected getAttributeFactory ( ) : MetaModels\Attribute\IAttributeFactory
Résultat MetaModels\Attribute\IAttributeFactory

getEventDispatcher() protected méthode

Get the event Dispatcher.
protected getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
Résultat Symfony\Component\EventDispatcher\EventDispatcherInterface

getFilterSettings() protected méthode

Get a filter based on the id.
protected getFilterSettings ( mixed $identifier ) : MetaModels\Filter\Setting\ICollection
$identifier mixed Id of the filter.
Résultat MetaModels\Filter\Setting\ICollection The filter

getJumpTosFor() protected méthode

Get the list of jumpTos based on the items.
protected getJumpTosFor ( array $availableLanguages, MetaModels\IMetaModel $metaModels, MetaModels\Filter\IFilter $filter, MetaModels\Render\Setting\ICollection $view, string | null $rootPage = null ) : array
$availableLanguages array List of languages to be used.
$metaModels MetaModels\IMetaModel The MetaModels to be used.
$filter MetaModels\Filter\IFilter The filter to be used.
$view MetaModels\Render\Setting\ICollection The view to be used.
$rootPage string | null The root page id or null if there is no root page.
Résultat array A list of urls for the jumpTos

getLanguage() protected méthode

First check the overwrite language. Then check if the MetaModels is translated and get all languages from it. Use the current language as fallback.
protected getLanguage ( string $singleLanguage, MetaModels\IMetaModel $metaModels ) : string[]
$singleLanguage string The language with the overwrite.
$metaModels MetaModels\IMetaModel The MetaModels for the check.
Résultat string[] A list with all languages or null.

getMetaModel() protected méthode

Get a MetaModels by name or id.
protected getMetaModel ( string | integer $identifier, boolean $ignoreError ) : MetaModels\IMetaModel | null
$identifier string | integer The Name or ID of a MetaModels.
$ignoreError boolean If true ignore errors like the MetaModels was not found.
Résultat MetaModels\IMetaModel | null

getMetaModelsFactory() protected méthode

Get the MetaModels Factory.
protected getMetaModelsFactory ( ) : MetaModels\IFactory
Résultat MetaModels\IFactory

getServiceContainer() protected méthode

Retrieve the service container.
protected getServiceContainer ( ) : MetaModels\IMetaModelsServiceContainer
Résultat MetaModels\IMetaModelsServiceContainer

getView() protected méthode

Get the view for a MetaModels.
protected getView ( string | integer $identifier, integer $view ) : MetaModels\Render\Setting\ICollection
$identifier string | integer ID/Name of the MetaModels.
$view integer ID of the view.
Résultat MetaModels\Render\Setting\ICollection

removeEmptyDetailPages() protected méthode

Remove all empty detail pages.
protected removeEmptyDetailPages ( array $jumpTos ) : void
$jumpTos array A list with the jumpTo pages.
Résultat void

setFilterParameters() public méthode

Set parameters.
public setFilterParameters ( string $filterId, string[] $presets, string[] $values ) : array
$filterId string The id of the filter.
$presets string[] The parameter preset values to use.
$values string[] The dynamic parameter values that may be used.
Résultat array

Property Details

$configs protected_oe property

A list with all settings from the database.
protected array $configs
Résultat array

$foundPages protected_oe property

A list with all pages found by Contao.
protected array $foundPages
Résultat array