PHP Class MetaModels\BackendIntegration\SearchablePages

Datei anzeigen Open project: metamodels/core

Protected Properties

Property Type Description
$configs array A list with all settings from the database.
$foundPages array A list with all pages found by Contao.

Public Methods

Method 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.

Protected Methods

Method 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

Method 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 method

Construct.
public __construct ( )

addPages() public method

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.
return array

getAttributeFactory() protected method

Get the attribute Factory.
protected getAttributeFactory ( ) : MetaModels\Attribute\IAttributeFactory
return MetaModels\Attribute\IAttributeFactory

getEventDispatcher() protected method

Get the event Dispatcher.
protected getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
return Symfony\Component\EventDispatcher\EventDispatcherInterface

getFilterSettings() protected method

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

getJumpTosFor() protected method

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.
return array A list of urls for the jumpTos

getLanguage() protected method

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.
return string[] A list with all languages or null.

getMetaModel() protected method

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.
return MetaModels\IMetaModel | null

getMetaModelsFactory() protected method

Get the MetaModels Factory.
protected getMetaModelsFactory ( ) : MetaModels\IFactory
return MetaModels\IFactory

getServiceContainer() protected method

Retrieve the service container.
protected getServiceContainer ( ) : MetaModels\IMetaModelsServiceContainer
return MetaModels\IMetaModelsServiceContainer

getView() protected method

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.
return MetaModels\Render\Setting\ICollection

removeEmptyDetailPages() protected method

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

setFilterParameters() public method

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.
return array

Property Details

$configs protected_oe property

A list with all settings from the database.
protected array $configs
return array

$foundPages protected_oe property

A list with all pages found by Contao.
protected array $foundPages
return array