Drupal 8  8.0.2
SearchPageRepository Class Reference
Inheritance diagram for SearchPageRepository:

Public Member Functions

 __construct (ConfigFactoryInterface $config_factory, EntityManagerInterface $entity_manager)
 
 getActiveSearchPages ()
 
 isSearchActive ()
 
 getIndexableSearchPages ()
 
 getDefaultSearchPage ()
 
 clearDefaultSearchPage ()
 
 setDefaultSearchPage (SearchPageInterface $search_page)
 
 sortSearchPages ($search_pages)
 

Protected Member Functions

 getQuery ()
 

Protected Attributes

 $configFactory
 
 $storage
 

Detailed Description

Provides a repository for Search Page config entities.

Constructor & Destructor Documentation

__construct ( ConfigFactoryInterface  $config_factory,
EntityManagerInterface  $entity_manager 
)

Constructs a new SearchPageRepository.

Parameters
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe config factory.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.

References Drupal\configFactory().

Here is the call graph for this function:

Member Function Documentation

clearDefaultSearchPage ( )

{Clears the default search page.}

Implements SearchPageRepositoryInterface.

References Drupal\configFactory().

Here is the call graph for this function:

getActiveSearchPages ( )

{Returns all active search page entities.

Returns
[] An array of active search page entities.
}

Implements SearchPageRepositoryInterface.

References SearchPageRepository\getQuery().

Referenced by SearchPageRepository\getIndexableSearchPages().

Here is the call graph for this function:

Here is the caller graph for this function:

getDefaultSearchPage ( )

{Returns the default search page.

Returns
|bool The search page entity, or FALSE if no pages are active.
}

Implements SearchPageRepositoryInterface.

References Drupal\configFactory(), and SearchPageRepository\getQuery().

Here is the call graph for this function:

getIndexableSearchPages ( )

{Returns all active, indexable search page entities.

Returns
[] An array of indexable search page entities.
}

Implements SearchPageRepositoryInterface.

References SearchPageRepository\getActiveSearchPages(), and SearchPageInterface\isIndexable().

Here is the call graph for this function:

getQuery ( )
protected

Returns an entity query instance.

Returns
The query instance.

Referenced by SearchPageRepository\getActiveSearchPages(), SearchPageRepository\getDefaultSearchPage(), and SearchPageRepository\isSearchActive().

Here is the caller graph for this function:

isSearchActive ( )

{Returns whether search is active.

Returns
bool TRUE if at least one search is active, FALSE otherwise.
}

Implements SearchPageRepositoryInterface.

References SearchPageRepository\getQuery().

Here is the call graph for this function:

setDefaultSearchPage ( SearchPageInterface  $search_page)

{Sets a given search page as the default.

Parameters
\Drupal\search\SearchPageInterface$search_pageThe search page entity.
Returns
static
}

Implements SearchPageRepositoryInterface.

References Drupal\configFactory(), ConfigEntityInterface\enable(), and EntityInterface\id().

Here is the call graph for this function:

sortSearchPages (   $search_pages)

{Sorts a list of search pages.

Parameters
\Drupal\search\SearchPageInterface[]$search_pages The unsorted list of search pages.
Returns
[] The sorted list of search pages.
}

Implements SearchPageRepositoryInterface.


The documentation for this class was generated from the following file: