Lue dans les fichiers PHP du paquet au commit a9693c953418 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
FaqBundleclassA FAQ on top of omnibase's Thread (the questions) and Taxon (the sections).
3 methods
PendingQuestionsWidgetTypeclassThe dashboard's tile: the questions still drafts - asked by visitors, or started and not finished.
4 methods
OpenToAdminsTraittraitThis bundle's screens are written by the site's administrators (ROLE_ADMIN: a teacher, an editor), not only by the super-admin the admin bundle requires by default for anything that writes - as omnibase/estate does. $custom names the screen's own actions (#[AdminAction]).
Base\Faq\Controller\Admin\Crud
QuestionCrudControllerclassAnswering the questions: the question (its title), the answer (its text), its section, its place, "à la une" for the home page. A visitor's question arrives as a draft, what they wrote in its preview, their e-mail kept to tell them.
6 methods
SectionCrudControllerclassThe FAQ's sections: omnibase's taxon screen, plus their order.
3 methods
FaqControllerclassThe FAQ: every section with its questions folded (<details>), a search, one question at its own address, and the form to ask another - which lands as a draft in the back office once Akismet has read it. Both pages carry schema.org's FAQPage (Service\JsonLd).
3 methods
FaqConfigurationclass1 method
FaqExtensionclass2 methods
AskclassWhat a visitor types in "Il manque une question ?": not an entity - a form model Akismet reads (SpamProtectionInterface) before it becomes a draft Question in the back office. A doubtful one is refused outright: the teacher's inbox is not a moderation queue.
5 methods · 5 properties
QuestionclassA question and its answer: an omnibase thread whose title is the question and whose text is the answer. Published, it is on /faq in its section (a taxon); a draft waits in the back office - the ones visitors ask arrive as drafts (Ask, FaqController::ask). Likes count the readers it helped.
12 methods
SectionclassA section of the FAQ ("Utiliser mes ressources", "La boutique"): an omnibase taxon, so it has a translated label and description, an icon, and may hold sub-sections. Its questions are the threads it classifies.
4 methods
AskTypeclass"Il manque une question ?": the question, a few details, an e-mail to be told once it is answered. Guarded as glitchr/omnibase guards a form (its option `guard`, action "ask"): a trap, the time it takes, the lists, the captcha when the site has glitchr/omnishield; Akismet reads what is written (the data_class implements SpamProtectionInterface); reCAPTCHA v3 in place of the guard's captcha when the host turned it on (glitchr/ux-google).
2 methods
QuestionRepositoryclass8 methods
AskNotifierclassThe administrators told of a question asked: the bell, and an e-mail, with a link to the draft.
2 methods
JsonLdclassThe questions as schema.org reads them: a FAQPage whose mainEntity is each Question with its acceptedAnswer. Plain arrays: the template encodes them. A question without an answer is left out - a FAQPage entry needs one.
2 methods
FaqExtensionclassWhat a host page asks the FAQ: a few questions for the home page, the sections for a menu.
2 methods
Base\Faq
FaqBundle class
class FaqBundle extends AbstractBaseBundle FaqBundle.php:10
A FAQ on top of omnibase's Thread (the questions) and Taxon (the sections).
FaqBundle::__construct()
public function __construct()FaqBundle::getPath()
public function getPath(): stringFaqBundle::build()
public function build(ContainerBuilder $container): voidBase\Faq\Admin\Widget
PendingQuestionsWidgetType class
final class PendingQuestionsWidgetType implements DashboardWidgetTypeInterface PendingQuestionsWidgetType.php:10
The dashboard's tile: the questions still drafts - asked by visitors, or started and not finished.
PendingQuestionsWidgetType::__construct()
public function __construct(readonly QuestionRepository $questions)PendingQuestionsWidgetType::getName()
public static function getName(): stringPendingQuestionsWidgetType::getTemplate()
public function getTemplate(): stringPendingQuestionsWidgetType::getTemplateVars()
public function getTemplateVars(MenuItem $widget): arrayBase\Faq\Controller\Admin
OpenToAdminsTrait trait
trait OpenToAdminsTrait OpenToAdminsTrait.php:14
This bundle's screens are written by the site's administrators (ROLE_ADMIN: a teacher, an editor), not only by the super-admin the admin bundle requires by default for anything that writes - as omnibase/estate does. $custom names the screen's own actions (#[AdminAction]).
Base\Faq\Controller\Admin\Crud
QuestionCrudController class
class QuestionCrudController extends AbstractCrudController QuestionCrudController.php:27
Answering the questions: the question (its title), the answer (its text), its section, its place, "à la une" for the home page. A visitor's question arrives as a draft, what they wrote in its preview, their e-mail kept to tell them.
QuestionCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringQuestionCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringQuestionCrudController::configureFilters()
public function configureFilters(Filters $filters): FiltersQuestionCrudController::configureActions()
public function configureActions(Actions $actions): ActionsQuestionCrudController::configureFields()
public function configureFields(string $pageName): iterableQuestionCrudController::createEntity()
public function createEntity(string $entityFqcn): objectSectionCrudController class
class SectionCrudController extends TaxonCrudController SectionCrudController.php:12
The FAQ's sections: omnibase's taxon screen, plus their order.
SectionCrudController::configureActions()
public function configureActions(Actions $actions): ActionsSectionCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringSectionCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringBase\Faq\Controller\Client
FaqController class
class FaqController extends AbstractController FaqController.php:27
The FAQ: every section with its questions folded (<details>), a search, one question at its own address, and the form to ask another - which lands as a draft in the back office once Akismet has read it. Both pages carry schema.org's FAQPage (Service\JsonLd).
FaqController::__construct()
public function __construct(readonly QuestionRepository $questions, readonly EntityManagerInterface $entityManager, readonly AskNotifier $notifier, readonly bool $askEnabled = true, readonly int $perSection = 20, readonly int $minDelay = 4, readonly ?\Google\Service\GrService $recaptcha = null, readonly ?JsonLd $jsonLd = null)FaqController::index()
public function index(Request $request): ResponseFaqController::question()
public function question(string $slug): ResponseBase\Faq\DependencyInjection
FaqConfiguration class
class FaqConfiguration extends AbstractBaseConfiguration FaqConfiguration.php:8
FaqConfiguration::getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilderFaqExtension class
class FaqExtension extends AbstractBaseExtension FaqExtension.php:11
FaqExtension::getConfiguration()
public function getConfiguration(array $config, ContainerBuilder $container): FaqConfigurationFaqExtension::load()
public function load(array $configs, ContainerBuilder $container): voidBase\Faq\Entity
Ask class
final class Ask implements SpamProtectionInterface Ask.php:16
What a visitor types in "Il manque une question ?": not an entity - a form model Akismet reads (SpamProtectionInterface) before it becomes a draft Question in the back office. A doubtful one is refused outright: the teacher's inbox is not a moderation queue.
public ?string $question = nullpublic ?string $details = nullpublic ?string $email = nullpublic ?int $spamScore = null
Ask::getSpamBlameable()
public function getSpamBlameable(): ?UserAsk::getSpamText()
public function getSpamText(): ?stringAsk::getSpamDate()
public function getSpamDate(): \DateTimeAsk::getSpamCallback()
public function getSpamCallback(int $score): voidAsk::isDoubtful()
public function isDoubtful(): boolQuestion class
class Question extends Thread implements LinkableInterface Question.php:19
A question and its answer: an omnibase thread whose title is the question and whose text is the answer. Published, it is on /faq in its section (a taxon); a draft waits in the back office - the ones visitors ask arrive as drafts (Ask, FaqController::ask). Likes count the readers it helped.
Question::__iconizeStatic()
public static function __iconizeStatic(): ?arrayQuestion::__toLink()
public function __toLink(array $routeParameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): ?stringQuestion::__toString()
public function __toString(): stringQuestion::getPosition()
public function getPosition(): intQuestion::setPosition()
public function setPosition(int $position): selfQuestion::isFeatured()
public function isFeatured(): boolQuestion::setFeatured()
public function setFeatured(bool $featured): selfQuestion::getAskedBy()
public function getAskedBy(): ?stringQuestion::setAskedBy()
public function setAskedBy(?string $email): selfQuestion::getSection()
public function getSection(): ?SectionQuestion::setSection()
public function setSection(?Section $section): selfQuestion::publish()
public function publish(bool $published = true): selfSection class
class Section extends Taxon Section.php:14
A section of the FAQ ("Utiliser mes ressources", "La boutique"): an omnibase taxon, so it has a translated label and description, an icon, and may hold sub-sections. Its questions are the threads it classifies.
Section::__iconizeStatic()
public static function __iconizeStatic(): ?arraySection::getPosition()
public function getPosition(): intSection::setPosition()
public function setPosition(int $position): selfSection::getPublishedQuestions()
public function getPublishedQuestions(): array- Returns
the published questions of this section, in order
Base\Faq\Form
AskType class
final class AskType extends AbstractType AskType.php:23
"Il manque une question ?": the question, a few details, an e-mail to be
told once it is answered. Guarded as glitchr/omnibase guards a form (its
option guard, action "ask"): a trap, the time it takes, the lists, the
captcha when the site has glitchr/omnishield; Akismet reads what is written
(the data_class implements SpamProtectionInterface); reCAPTCHA v3 in place
of the guard's captcha when the host turned it on (glitchr/ux-google).
AskType::buildForm()
public function buildForm(FormBuilderInterface $builder, array $options): voidAskType::configureOptions()
public function configureOptions(OptionsResolver $resolver): voidBase\Faq\Repository
QuestionRepository class
class QuestionRepository extends ServiceEntityRepository QuestionRepository.php:13
QuestionRepository::__construct()
public function __construct(ManagerRegistry $registry)QuestionRepository::findPublished()
public function findPublished(?Section $section = null, ?int $limit = null): array- Returns
the published ones, of one section when given, in order
QuestionRepository::findFeatured()
public function findFeatured(int $limit = 4): array- Returns
the featured ones first, then the most helpful
QuestionRepository::findOnePublished()
public function findOnePublished(string $slug): ?QuestionQuestionRepository::search()
public function search(string $term, int $limit = 20): arrayA plain search in the questions and answers.
@return list<Question>
QuestionRepository::findSections()
public function findSections(): array- Returns
the sections that have a published question, in order
QuestionRepository::countDrafts()
public function countDrafts(): intQuestionRepository::findDrafts()
public function findDrafts(int $limit = 5): arrayBase\Faq\Service
AskNotifier class
final class AskNotifier AskNotifier.php:14
The administrators told of a question asked: the bell, and an e-mail, with a link to the draft.
AskNotifier::__construct()
public function __construct(readonly EntityManagerInterface $entityManager, readonly RoleHierarchyInterface $roles, readonly UrlGeneratorInterface $urls, readonly TranslatorInterface $translator)AskNotifier::questionAsked()
public function questionAsked(Question $question): voidJsonLd class
final class JsonLd JsonLd.php:13
The questions as schema.org reads them: a FAQPage whose mainEntity is each Question with its acceptedAnswer. Plain arrays: the template encodes them. A question without an answer is left out - a FAQPage entry needs one.
JsonLd::page()
public function page(iterable $questions, ?string $url = null): ?array- Returns
null when no question has an answer
JsonLd::answer()
public static function answer(?string $content): stringAn answer as a FAQPage takes it: its HTML kept to paragraphs, lists, links and emphasis, without attributes other than a link's address; an EditorJS document (JSON) turned into paragraphs and lists.
Base\Faq\Twig
FaqExtension class
final class FaqExtension extends AbstractExtension FaqExtension.php:11
What a host page asks the FAQ: a few questions for the home page, the sections for a menu.
FaqExtension::__construct()
public function __construct(readonly QuestionRepository $questions)FaqExtension::getFunctions()
public function getFunctions(): array