mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-25 02:29:57 +08:00

Removes page/chpater addSelect global query, to load book slug, and instead extracts base queries to be managed in new static class, while updating specific entitiy relation loading to use our more efficient MixedEntityListLoader where appropriate. Related to #4823
26 lines
612 B
PHP
26 lines
612 B
PHP
<?php
|
|
|
|
namespace BookStack\Entities\Queries;
|
|
|
|
use BookStack\Entities\EntityProvider;
|
|
use BookStack\Entities\Tools\MixedEntityListLoader;
|
|
use BookStack\Permissions\PermissionApplicator;
|
|
|
|
abstract class EntityQuery
|
|
{
|
|
protected function mixedEntityListLoader(): MixedEntityListLoader
|
|
{
|
|
return app()->make(MixedEntityListLoader::class);
|
|
}
|
|
|
|
protected function permissionService(): PermissionApplicator
|
|
{
|
|
return app()->make(PermissionApplicator::class);
|
|
}
|
|
|
|
protected function entityProvider(): EntityProvider
|
|
{
|
|
return app()->make(EntityProvider::class);
|
|
}
|
|
}
|