mugoweb/ibexa-bundle

Useful tools for ibexa

Installs: 60

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 7

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master 2024-02-02 15:36 UTC

This package is auto-updated.

Last update: 2024-02-02 15:36:56 UTC


README

composer require mugoweb/mugoweb/ibexa-bundle:dev-master

Afterward, you need to enable the bundle in config/bundles.php:

MugoWeb\IbexaBundle\MugoWebIbexaBundle::class => ['all' => true],

If you'd like to use the features location quick finder or Location query tester, you would need to load the routes.yml file of this bundle. Tip: use a path prefix to avoid path conflicts.

Tests

php bin/phpunit vendor/mugoweb/ibexa-bundle/tests/

Features

Location quick finder

For a given location ID, following path redirects to the full view of the corresponding content object:

/location/{locationId}

Location query tester

It allows you to fetch Locations for a given LocationQuery string.

Use this path to access it:

/query

Log user hash generation

To enable add following to your service configuration:

  # Enable to log user variation hashes
  fos_http_cache.user_context.hash_generator:
    class: MugoWeb\IbexaBundle\Service\DebugHashGenerator
    arguments:
      $cachePool: '@ibexa.cache_pool'

Commands

php bin/console ibexa:trash:purge <limit>

Command to purge items from the trash

QueryStringParser

Here is an example:

$query = QueryStringParser::getQueryObject(
	'LocationQuery',
	'ParentLocationId:123 and ContentTypeIdentifier:article',
	'Field.article.publish_date:DESC',
	20
);

LocationQuery and Query

Consider to use the QueryStringParser instead. A different way to generate the LocationQuery. You can use it then for the find or search service. Here is an example:

$locationQuery = LocationQuery::build(
    'Subtree:' . $parentLocation->pathString . ' and (ContentTypeIdentifier:article or ContentTypeIdentifier:folder ro ContentTypeIdentifier:blog)',
    'Location\Priority: ASC',
     5
);