Lue dans les fichiers PHP du paquet au commit a5af4be92fff : 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é.
ClassroomBundleclassThe open classroom: levels, subjects, sequences, cards and resources on omnibase's Thread and Taxon.
3 methods
ClassroomOverviewWidgetTypeclassThe classroom at a glance: sequences online and in draft, cards, resources, downloads, what was bought this month.
4 methods
Base\Classroom\Controller\Admin
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\Classroom\Controller\Admin\Crud
CardCrudControllerclassThe idea cards: a picture, a title, a line, a few paragraphs, up to three links, levels and subjects.
6 methods
LevelCrudControllerclassThe levels: omnibase's taxon screen, plus what a level adds.
3 methods
PurposeCrudControllerclassThe purposes: omnibase's taxon screen, plus what a purpose adds.
3 methods
ResourceCrudControllerclassThe resources: the file (on the private storage), its saved name, who it is for, its preview picture, its levels and subjects. "Mettre en vente" creates the shop's offer for a paid one in one click (omnibase/marketplace).
8 methods
ResourceOfferCrudControllerclassThe resources for sale: the shop's product screen, plus the resource delivered.
3 methods
SequenceCrudControllerclassWriting a sequence: title, levels, subjects, purposes, period, duration, objectives and competences (one per line), material, the presentation (EditorJS, autosaved - and co-edited live when the relay runs), the resources attached, the cover. Its sessions have their own screen.
6 methods
SessionCrudControllerclassThe sessions: which sequence, which place, how long, the aim, the course.
6 methods
SubjectCrudControllerclassThe subjects: omnibase's taxon screen, plus what a subject adds.
3 methods
Base\Classroom\Controller\Client
ClassroomControllerclassThe classroom read by level, by subject, by purpose - the way a colleague looks for things: "CP › Allemand", "Multi-niveaux › Arts", "Pour la classe › Rituels" - each page listing the sequences, the cards and the resources that match, in the chronicle's order (newest first), by period when asked. Then the sequences, the cards, the resources on their own, and a search across all three.
11 methods
ResourceControllerclassA resource's page - its preview (a picture, or the first rows of a spreadsheet), its levels and subjects, the sequences it belongs to, the offer when it is for sale - and its download in two steps: the button checks who you are (ResourceVoter) and redirects to a signed, short-lived file URL, served by nginx (X-Accel-Redirect to classroom.accel_prefix) or, without it, by PHP.
4 methods
ShopControllerclassThe shop of a classroom: the files for sale, on one page. Each is bought in one step with omnibase/marketplace's quick order - an e-mail address, the payment, no account -, and the order's page lists the files (EventSubscriber\QuickOrderFilesListener).
3 methods
Base\Classroom\DependencyInjection
ClassroomConfigurationclass1 method
ClassroomExtensionclass3 methods
Base\Classroom\DependencyInjection\Compiler
EmbedsConsentPassclassWhat a sequence or a card frames (Canva, Padlet, a video...) comes with its provider's cookies: with omnibase/consent, it waits for the EMBEDS feature (the name omnibase/video's platform frames use), which this adds to the features every site starts from (consent.defaults, the bundle's own config/features.php) - on demand: listed in the detailed section on a page that frames something, never a reason to ask a visitor again - with what these providers were seen to keep. Its words are this bundle's translations/consent+intl-icu.*.yaml.
1 method · 2 constants
CardclassAn idea card, the ones a colleague picks from the fan on the home page: a picture, a title, a line (the headline), a few paragraphs (the text), one to three links - to a sequence, a resource, a chronicle, a site -, and its levels and subjects.
18 methods
ClassifiedTraittraitWhat the classroom's threads share: their levels, subjects and purposes are their omnibase taxa, read back by kind and written by kind (the back office's three pickers, see TaxaOfKindTrait).
12 methods
EntitlementclassThe right to download a paid resource: written when the order holding its offer is paid (EventSubscriber\OrderPaidSubscriber), one per resource and buyer, remembering the order. Never expires; the file may be fetched again after a lost download.
8 methods
LevelclassA class level, in a tree of cycles: Cycle 1 › PS, MS, GS; Cycle 2 › CP, CE1, CE2; Cycle 3 › CM1, CM2. An omnibase taxon: label, description and icon come with it. A thread carrying several levels is "multi-niveaux".
8 methods
Purposeclass"Pour la classe": what a thing is for rather than what it teaches - rituals, displays, autonomy, games, methods, organisation. An omnibase taxon.
3 methods
ResourceclassA file to download - a PDF of cards, a game's spreadsheet, a set of flashcards zipped -, with a title, a description, a preview picture, its levels and subjects (taxa, like the threads), and who it is for: anyone, the members, or whoever bought it (a Product\ResourceOffer sells it). The file stays out of public/ (the local.classroom storage) and is served through signed links (glitchr/omnibase's Base\Service\DownloadLinks); each download is counted.
46 methods
SequenceclassA learning sequence: what it teaches (its subjects), to whom (its levels), when in the year (its period), what it aims at (objectives, competences of the programmes), what it needs (material), and its sessions - threads of their own, children of this one, in order. Its text is the presentation; its resources are the files to download.
29 methods
SessionclassOne session of a sequence - a thread whose parent is the sequence: its title, its place, its duration, its aim (the headline) and its course (the text, EditorJS). Read on the sequence's page, folded one under the other; published with it.
13 methods
SubjectclassA discipline and its domains: Français › Lecture, Écriture, Grammaire…; Allemand › Vocabulaire, Culture…; Mathématiques, Questionner le monde, EMC, Arts, EPS. An omnibase taxon.
5 methods
TaxaOfKindTraittraitOne kind of taxa written at a time: the levels, the subjects and the purposes share one association (taxa), and each has its own picker in the back office. A picker sets the taxa of its kind and leaves the others where they are; a value that is not of its kind (an identifier no entity was found for, a taxon of another kind) is ignored, never handed to Doctrine.
ResourceOfferclassA resource for sale: a marketplace product whose delivery is a download.
4 methods
PeriodenumThe five periods of the French school year, between the holidays.
1 method · 5 cases
VisibilityenumWho may download a resource: anyone, the members, or whoever bought it.
3 cases
Base\Classroom\EventSubscriber
OrderPaidSubscriberclassWhat a paid order delivers here: an Entitlement to each resource whose offer it holds, for the buyer - and a mail with the link of the page where the files are downloaded (omnibase/marketplace's quick order page, signed: no account needed). A webhook and a redirect may both confirm the same order: an entitlement that exists is left alone, and the mail goes once.
2 methods
QuickOrderFilesListenerclassThe page of a quick order that bought files: the files themselves, each behind a signed download link (a day), once the order is paid. The page is reached by its own signed link - shown after the payment, and mailed (OrderPaidSubscriber) - so the files are for whoever holds it.
3 methods
CardRepositoryclass5 methods
ClassifiedRepositoryTraittraitFiltering a thread query by taxa slugs: each slug given must be among the thread's taxa.
EntitlementRepositoryclass4 methods
ResourceRepositoryclass5 methods
SequenceRepositoryclass7 methods
SessionRepositoryclass1 method
ResourceVoterclassWho may download a resource: anyone for a free one, the members (classroom.members_role) for a members' one, whoever holds an Entitlement for a paid one - and the administrators always.
1 method · 1 constant
SpreadsheetPreviewclassThe first rows of a spreadsheet resource, as a table on its page: a colleague sees what the Kangourou file holds before downloading it. xlsx, xls, xlsm and ods through PhpSpreadsheet, csv read directly; the result cached until the resource changes.
2 methods
TaxaclassThe levels, subjects and purposes, in order, as the menus and filters list them.
8 methods
ClassroomExtensionclassWhat a host page asks the classroom: the taxa for its menus, the cards for its fan, the latest sequences and resources.
3 methods
Base\Classroom
ClassroomBundle class
class ClassroomBundle extends AbstractBaseBundle ClassroomBundle.php:11
The open classroom: levels, subjects, sequences, cards and resources on omnibase's Thread and Taxon.
ClassroomBundle::__construct()
public function __construct()ClassroomBundle::getPath()
public function getPath(): stringClassroomBundle::build()
public function build(ContainerBuilder $container): voidBase\Classroom\Admin\Widget
ClassroomOverviewWidgetType class
final class ClassroomOverviewWidgetType implements DashboardWidgetTypeInterface ClassroomOverviewWidgetType.php:16
The classroom at a glance: sequences online and in draft, cards, resources, downloads, what was bought this month.
ClassroomOverviewWidgetType::__construct()
public function __construct(readonly EntityManagerInterface $entityManager, readonly SequenceRepository $sequences, readonly ResourceRepository $resources, readonly EntitlementRepository $entitlements)ClassroomOverviewWidgetType::getName()
public static function getName(): stringClassroomOverviewWidgetType::getTemplate()
public function getTemplate(): stringClassroomOverviewWidgetType::getTemplateVars()
public function getTemplateVars(MenuItem $widget): arrayBase\Classroom\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\Classroom\Controller\Admin\Crud
CardCrudController class
class CardCrudController extends AbstractCrudController CardCrudController.php:25
The idea cards: a picture, a title, a line, a few paragraphs, up to three links, levels and subjects.
CardCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringCardCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringCardCrudController::configureFilters()
public function configureFilters(Filters $filters): FiltersCardCrudController::configureActions()
public function configureActions(Actions $actions): ActionsCardCrudController::configureFields()
public function configureFields(string $pageName): iterableCardCrudController::createEntity()
public function createEntity(string $entityFqcn): objectLevelCrudController class
class LevelCrudController extends TaxonCrudController LevelCrudController.php:14
The levels: omnibase's taxon screen, plus what a level adds.
LevelCrudController::configureActions()
public function configureActions(Actions $actions): ActionsLevelCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringLevelCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringPurposeCrudController class
class PurposeCrudController extends TaxonCrudController PurposeCrudController.php:12
The purposes: omnibase's taxon screen, plus what a purpose adds.
PurposeCrudController::configureActions()
public function configureActions(Actions $actions): ActionsPurposeCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringPurposeCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringResourceCrudController class
class ResourceCrudController extends AbstractCrudController ResourceCrudController.php:32
The resources: the file (on the private storage), its saved name, who it is for, its preview picture, its levels and subjects. "Mettre en vente" creates the shop's offer for a paid one in one click (omnibase/marketplace).
ResourceCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringResourceCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringResourceCrudController::configureFilters()
public function configureFilters(Filters $filters): FiltersResourceCrudController::configureFields()
public function configureFields(string $pageName): iterableResourceCrudController::configureActions()
public function configureActions(Actions $actions): ActionsResourceCrudController::persistEntity()
public function persistEntity(EntityManagerInterface $entityManager, object $entity): voidBefore the file lands: its name, type and size kept on the row.
ResourceCrudController::updateEntity()
public function updateEntity(EntityManagerInterface $entityManager, object $entity): voidResourceCrudController::sell()
public function sell(string $entityId): ResponseThe shop's offer for this resource, made (or found) and opened for its price.
ResourceOfferCrudController class
class ResourceOfferCrudController extends ProductCrudController ResourceOfferCrudController.php:11
The resources for sale: the shop's product screen, plus the resource delivered.
ResourceOfferCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringResourceOfferCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringResourceOfferCrudController::configureFields()
public function configureFields(string $pageName): iterableSequenceCrudController class
class SequenceCrudController extends AbstractCrudController SequenceCrudController.php:33
Writing a sequence: title, levels, subjects, purposes, period, duration, objectives and competences (one per line), material, the presentation (EditorJS, autosaved - and co-edited live when the relay runs), the resources attached, the cover. Its sessions have their own screen.
SequenceCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringSequenceCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringSequenceCrudController::configureFilters()
public function configureFilters(Filters $filters): FiltersSequenceCrudController::configureActions()
public function configureActions(Actions $actions): ActionsSequenceCrudController::configureFields()
public function configureFields(string $pageName): iterableSequenceCrudController::createEntity()
public function createEntity(string $entityFqcn): objectSessionCrudController class
class SessionCrudController extends AbstractCrudController SessionCrudController.php:21
The sessions: which sequence, which place, how long, the aim, the course.
SessionCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringSessionCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringSessionCrudController::configureFilters()
public function configureFilters(Filters $filters): FiltersSessionCrudController::configureActions()
public function configureActions(Actions $actions): ActionsSessionCrudController::configureFields()
public function configureFields(string $pageName): iterableSessionCrudController::createEntity()
public function createEntity(string $entityFqcn): objectSubjectCrudController class
class SubjectCrudController extends TaxonCrudController SubjectCrudController.php:13
The subjects: omnibase's taxon screen, plus what a subject adds.
SubjectCrudController::configureActions()
public function configureActions(Actions $actions): ActionsSubjectCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringSubjectCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringBase\Classroom\Controller\Client
ClassroomController class
class ClassroomController extends AbstractController ClassroomController.php:28
The classroom read by level, by subject, by purpose - the way a colleague looks for things: "CP › Allemand", "Multi-niveaux › Arts", "Pour la classe › Rituels" - each page listing the sequences, the cards and the resources that match, in the chronicle's order (newest first), by period when asked. Then the sequences, the cards, the resources on their own, and a search across all three.
ClassroomController::__construct()
public function __construct(readonly Taxa $taxa, readonly SequenceRepository $sequences, readonly CardRepository $cards, readonly ResourceRepository $resources, readonly int $perPage = 24)ClassroomController::index()
public function index(): ResponseClassroomController::level()
public function level(Request $request, string $level, ?string $subject): ResponseClassroomController::subject()
public function subject(Request $request, string $subject): ResponseClassroomController::purpose()
public function purpose(Request $request, string $purpose): ResponseClassroomController::sequences()
public function sequences(Request $request): ResponseClassroomController::sequence()
public function sequence(string $slug): ResponseClassroomController::cards()
public function cards(Request $request): ResponseClassroomController::card()
public function card(string $slug): ResponseClassroomController::resources()
public function resources(Request $request): ResponseClassroomController::search()
public function search(Request $request): ResponseResourceController class
class ResourceController extends AbstractController ResourceController.php:30
A resource's page - its preview (a picture, or the first rows of a spreadsheet), its levels and subjects, the sequences it belongs to, the offer when it is for sale - and its download in two steps: the button checks who you are (ResourceVoter) and redirects to a signed, short-lived file URL, served by nginx (X-Accel-Redirect to classroom.accel_prefix) or, without it, by PHP.
ResourceController::__construct()
public function __construct(readonly ResourceRepository $resources, readonly EntitlementRepository $entitlements, readonly EntityManagerInterface $entityManager, readonly DownloadLinks $links, readonly SpreadsheetPreview $preview, readonly string $accelPrefix = '', readonly int $downloadTtl = 600)ResourceController::show()
public function show(string $slug): ResponseResourceController::download()
public function download(string $slug): ResponseResourceController::serve()
public function serve(Request $request, int $id): ResponseShopController class
class ShopController extends AbstractController ShopController.php:18
The shop of a classroom: the files for sale, on one page. Each is bought in one step with omnibase/marketplace's quick order - an e-mail address, the payment, no account -, and the order's page lists the files (EventSubscriber\QuickOrderFilesListener).
ShopController::__construct()
public function __construct(readonly EntityManagerInterface $entityManager)ShopController::index()
public function index(): ResponseShopController::sellable()
public static function sellable(ResourceOffer $offer): boolFor sale, its resource online with a file to hand over.
Base\Classroom\DependencyInjection
ClassroomConfiguration class
class ClassroomConfiguration extends AbstractBaseConfiguration ClassroomConfiguration.php:8
ClassroomConfiguration::getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilderClassroomExtension class
class ClassroomExtension extends AbstractBaseExtension implements PrependExtensionInterface ClassroomExtension.php:12
ClassroomExtension::prepend()
public function prepend(ContainerBuilder $container): voidclassroom.consent: whether the site has omnibase/consent, whose EMBEDS feature the frames then wait for (Compiler\EmbedsConsentPass declares it, classroom_consent() names it to the templates). Without it the frames load with the page, as before.
ClassroomExtension::getConfiguration()
public function getConfiguration(array $config, ContainerBuilder $container): ClassroomConfigurationClassroomExtension::load()
public function load(array $configs, ContainerBuilder $container): voidBase\Classroom\DependencyInjection\Compiler
EmbedsConsentPass class
final class EmbedsConsentPass implements CompilerPassInterface EmbedsConsentPass.php:25
What a sequence or a card frames (Canva, Padlet, a video...) comes with its provider's cookies: with omnibase/consent, it waits for the EMBEDS feature (the name omnibase/video's platform frames use), which this adds to the features every site starts from (consent.defaults, the bundle's own config/features.php) - on demand: listed in the detailed section on a page that frames something, never a reason to ask a visitor again - with what these providers were seen to keep. Its words are this bundle's translations/consent+intl-icu.*.yaml.
A default rather than a consent: configuration of its own: the site's
consent.features.EMBEDS is laid over it field by field as over any of the
bundle's features, defaults: false leaves it out, and it is no feature
the site configured (data-consent-groups, the list pages served by
consent-legacy.js read, stays the site's). Another bundle's EMBEDS keeps
its fields; the entries it does not name are added to its storage.
const FEATURE = 'EMBEDS'const STORAGE = [['name' => 'CDI', 'domain' => 'www.canva.com', 'duration' => '1y', 'purpose' => 'embeds_canva'], ['name' => 'CL', 'domain' => 'www.canva.com', 'duration' =>…
EmbedsConsentPass::process()
public function process(ContainerBuilder $container): voidBase\Classroom\Entity
Card class
class Card extends Thread implements LinkableInterface Card.php:20
An idea card, the ones a colleague picks from the fan on the home page: a picture, a title, a line (the headline), a few paragraphs (the text), one to three links - to a sequence, a resource, a chronicle, a site -, and its levels and subjects.
Card::__iconizeStatic()
public static function __iconizeStatic(): ?arrayCard::__toLink()
public function __toLink(array $routeParameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): ?stringCard::__toString()
public function __toString(): stringCard::getImage()
public function getImage(): ?stringCard::getImageFile()
public function getImageFile(): ?FileCard::setImage()
public function setImage($image): selfCard::getLinks()
public function getLinks(): arrayCard::setLinks()
public function setLinks(array|string|null $links): self$links"label | url" per line when a string
Card::getLinksText()
public function getLinksText(): stringThe links, one per line, for a textarea.
Card::setLinksText()
public function setLinksText(?string $text): selfCard::isFeatured()
public function isFeatured(): boolCard::setFeatured()
public function setFeatured(bool $featured): selfCard::getPosition()
public function getPosition(): intCard::setPosition()
public function setPosition(int $position): selfCard::getIcon()
public function getIcon(): ?stringCard::setIcon()
public function setIcon(?string $icon): selfCard::getColor()
public function getColor(): ?stringCard::setColor()
public function setColor(?string $color): selfClassifiedTrait trait
trait ClassifiedTrait ClassifiedTrait.php:10
What the classroom's threads share: their levels, subjects and purposes are their omnibase taxa, read back by kind and written by kind (the back office's three pickers, see TaxaOfKindTrait).
ClassifiedTrait::getEmbeds()
public function getEmbeds(): arrayClassifiedTrait::setEmbeds()
public function setEmbeds(array|string|null $embeds): self$embeds"Label | https://…" per line when a string
ClassifiedTrait::getEmbedsText()
public function getEmbedsText(): stringThe embeds, one per line, for a textarea.
ClassifiedTrait::setEmbedsText()
public function setEmbedsText(?string $text): selfClassifiedTrait::getLevels()
public function getLevels(): arrayClassifiedTrait::setLevels()
public function setLevels(?iterable $levels): self$levelsin place of the levels it had; its subjects and purposes stay
ClassifiedTrait::getSubjects()
public function getSubjects(): arrayClassifiedTrait::setSubjects()
public function setSubjects(?iterable $subjects): self$subjectsin place of the subjects it had; its levels and purposes stay
ClassifiedTrait::getPurposes()
public function getPurposes(): arrayClassifiedTrait::setPurposes()
public function setPurposes(?iterable $purposes): self$purposesin place of the purposes it had; its levels and subjects stay
ClassifiedTrait::isMultiLevel()
public function isMultiLevel(): boolSeveral levels at once: "multi-niveaux".
ClassifiedTrait::getLevelsLabel()
public function getLevelsLabel(): string"CP · CE1"
Entitlement class
class Entitlement Entitlement.php:16
The right to download a paid resource: written when the order holding its offer is paid (EventSubscriber\OrderPaidSubscriber), one per resource and buyer, remembering the order. Never expires; the file may be fetched again after a lost download.
Entitlement::__construct()
public function __construct(?User $user = null, ?Resource $resource = null, ?string $orderReference = null)Entitlement::getId()
public function getId(): ?intEntitlement::getUser()
public function getUser(): ?UserEntitlement::getResource()
public function getResource(): ?ResourceEntitlement::getOrderReference()
public function getOrderReference(): ?stringEntitlement::getDownloads()
public function getDownloads(): intEntitlement::countDownload()
public function countDownload(): selfEntitlement::getCreatedAt()
public function getCreatedAt(): ?\DateTimeInterfaceLevel class
class Level extends Taxon Level.php:14
A class level, in a tree of cycles: Cycle 1 › PS, MS, GS; Cycle 2 › CP, CE1, CE2; Cycle 3 › CM1, CM2. An omnibase taxon: label, description and icon come with it. A thread carrying several levels is "multi-niveaux".
Level::__iconizeStatic()
public static function __iconizeStatic(): ?arrayLevel::getPosition()
public function getPosition(): intLevel::setPosition()
public function setPosition(int $position): selfLevel::getShort()
public function getShort(): ?stringLevel::setShort()
public function setShort(?string $short): selfLevel::getColor()
public function getColor(): ?stringLevel::setColor()
public function setColor(?string $color): selfLevel::isCycle()
public function isCycle(): boolA cycle holds levels; a level holds none.
Purpose class
class Purpose extends Taxon Purpose.php:13
"Pour la classe": what a thing is for rather than what it teaches - rituals, displays, autonomy, games, methods, organisation. An omnibase taxon.
Purpose::__iconizeStatic()
public static function __iconizeStatic(): ?arrayPurpose::getPosition()
public function getPosition(): intPurpose::setPosition()
public function setPosition(int $position): selfResource class
class Resource Resource.php:26
A file to download - a PDF of cards, a game's spreadsheet, a set of flashcards zipped -, with a title, a description, a preview picture, its levels and subjects (taxa, like the threads), and who it is for: anyone, the members, or whoever bought it (a Product\ResourceOffer sells it). The file stays out of public/ (the local.classroom storage) and is served through signed links (glitchr/omnibase's Base\Service\DownloadLinks); each download is counted.
Resource::__construct()
public function __construct(?User $owner = null, ?string $title = null)Resource::__toString()
public function __toString(): stringResource::getId()
public function getId(): ?intResource::getTitle()
public function getTitle(): ?stringResource::setTitle()
public function setTitle(?string $title): selfResource::getSlug()
public function getSlug(): ?stringResource::setSlug()
public function setSlug(?string $slug): selfResource::getDescription()
public function getDescription(): ?stringResource::setDescription()
public function setDescription(?string $description): selfResource::getFile()
public function getFile(): ?FileResource::setFile()
public function setFile($file): selfResource::hasFile()
public function hasFile(): boolResource::getFilename()
public function getFilename(): ?stringResource::setFilename()
public function setFilename(?string $filename): selfResource::getMimeType()
public function getMimeType(): ?stringResource::setMimeType()
public function setMimeType(?string $mimeType): selfResource::getSize()
public function getSize(): ?intResource::setSize()
public function setSize(?int $size): selfResource::getExtension()
public function getExtension(): ?string"pdf", "xlsx", "csv", "zip"… from the saved name, else from the type.
Resource::isSpreadsheet()
public function isSpreadsheet(): boolResource::getPreview()
public function getPreview(): ?stringResource::getPreviewFile()
public function getPreviewFile(): ?FileResource::setPreview()
public function setPreview($preview): selfResource::getVisibility()
public function getVisibility(): VisibilityResource::setVisibility()
public function setVisibility(Visibility|string $visibility): selfResource::getVisibilityValue()
public function getVisibilityValue(): stringThe raw value, for the admin's select.
Resource::setVisibilityValue()
public function setVisibilityValue(?string $visibility): selfResource::isFree()
public function isFree(): boolResource::isPaid()
public function isPaid(): boolResource::isPublished()
public function isPublished(): boolResource::setPublished()
public function setPublished(bool $published): selfResource::getTaxa()
public function getTaxa(): CollectionResource::addTaxon()
public function addTaxon(\Base\Entity\Thread\Taxon $taxon): selfResource::removeTaxon()
public function removeTaxon(\Base\Entity\Thread\Taxon $taxon): selfResource::getLevels()
public function getLevels(): arrayResource::setLevels()
public function setLevels(?iterable $levels): self$levelsin place of the levels it had; its subjects stay
Resource::getSubjects()
public function getSubjects(): arrayResource::setSubjects()
public function setSubjects(?iterable $subjects): self$subjectsin place of the subjects it had; its levels stay
Resource::getLevelsLabel()
public function getLevelsLabel(): stringResource::getSequences()
public function getSequences(): CollectionResource::getDownloads()
public function getDownloads(): intResource::countDownload()
public function countDownload(): selfResource::getOwner()
public function getOwner(): ?UserResource::setOwner()
public function setOwner(?User $owner): selfResource::getCreatedAt()
public function getCreatedAt(): ?\DateTimeInterfaceResource::getUpdatedAt()
public function getUpdatedAt(): ?\DateTimeInterfaceSequence class
class Sequence extends Thread implements LinkableInterface Sequence.php:24
A learning sequence: what it teaches (its subjects), to whom (its levels), when in the year (its period), what it aims at (objectives, competences of the programmes), what it needs (material), and its sessions - threads of their own, children of this one, in order. Its text is the presentation; its resources are the files to download.
Sequence::__iconizeStatic()
public static function __iconizeStatic(): ?arraySequence::__toLink()
public function __toLink(array $routeParameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): ?stringSequence::__construct()
public function __construct(?\Base\Entity\User $owner = null, ?Thread $parent = null, ?string $title = null, ?string $slug = null)Sequence::__toString()
public function __toString(): stringSequence::getPeriod()
public function getPeriod(): ?PeriodSequence::setPeriod()
public function setPeriod(Period|string|null $period): selfSequence::getPeriodValue()
public function getPeriodValue(): ?stringSequence::setPeriodValue()
public function setPeriodValue(?string $period): selfSequence::getDurationMinutes()
public function getDurationMinutes(): ?intSequence::setDurationMinutes()
public function setDurationMinutes(?int $minutes): selfSequence::getObjectives()
public function getObjectives(): arraySequence::setObjectives()
public function setObjectives(array|string|null $objectives): self$objectivesone per line when a string
Sequence::getCompetences()
public function getCompetences(): arraySequence::setCompetences()
public function setCompetences(array|string|null $competences): selfSequence::getObjectivesText()
public function getObjectivesText(): stringThe objectives and competences one per line, for a textarea.
Sequence::setObjectivesText()
public function setObjectivesText(?string $text): selfSequence::getCompetencesText()
public function getCompetencesText(): stringSequence::setCompetencesText()
public function setCompetencesText(?string $text): selfSequence::getMaterials()
public function getMaterials(): ?stringSequence::setMaterials()
public function setMaterials(?string $materials): selfSequence::getCover()
public function getCover(): ?stringSequence::getCoverFile()
public function getCoverFile(): ?FileSequence::setCover()
public function setCover($cover): selfSequence::isFeatured()
public function isFeatured(): boolSequence::setFeatured()
public function setFeatured(bool $featured): selfSequence::getSessions()
public function getSessions(): array- Returns
in order
Sequence::getResources()
public function getResources(): CollectionSequence::addResource()
public function addResource(Resource $resource): selfSequence::removeResource()
public function removeResource(Resource $resource): selfSession class
class Session extends Thread implements LinkableInterface Session.php:18
One session of a sequence - a thread whose parent is the sequence: its title, its place, its duration, its aim (the headline) and its course (the text, EditorJS). Read on the sequence's page, folded one under the other; published with it.
Session::__iconizeStatic()
public static function __iconizeStatic(): ?arraySession::__toLink()
public function __toLink(array $routeParameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): ?stringSession::__toString()
public function __toString(): stringSession::getSequence()
public function getSequence(): ?SequenceSession::setSequence()
public function setSequence(?Sequence $sequence): selfSession::getPosition()
public function getPosition(): intSession::setPosition()
public function setPosition(int $position): selfSession::getDurationMinutes()
public function getDurationMinutes(): ?intSession::setDurationMinutes()
public function setDurationMinutes(?int $minutes): selfSession::getMaterials()
public function getMaterials(): arraySession::getMaterialsText()
public function getMaterialsText(): stringSession::setMaterialsText()
public function setMaterialsText(?string $text): selfSession::setMaterials()
public function setMaterials(array|string|null $materials): selfSubject class
class Subject extends Taxon Subject.php:14
A discipline and its domains: Français › Lecture, Écriture, Grammaire…; Allemand › Vocabulaire, Culture…; Mathématiques, Questionner le monde, EMC, Arts, EPS. An omnibase taxon.
Subject::__iconizeStatic()
public static function __iconizeStatic(): ?arraySubject::getPosition()
public function getPosition(): intSubject::setPosition()
public function setPosition(int $position): selfSubject::getColor()
public function getColor(): ?stringSubject::setColor()
public function setColor(?string $color): selfTaxaOfKindTrait trait
trait TaxaOfKindTrait TaxaOfKindTrait.php:14
One kind of taxa written at a time: the levels, the subjects and the purposes share one association (taxa), and each has its own picker in the back office. A picker sets the taxa of its kind and leaves the others where they are; a value that is not of its kind (an identifier no entity was found for, a taxon of another kind) is ignored, never handed to Doctrine.
The class using it has getTaxa(), addTaxon() and removeTaxon().
Base\Classroom\Entity\Product
ResourceOffer class
class ResourceOffer extends Product ResourceOffer.php:15
A resource for sale: a marketplace product whose delivery is a download.
Paid, the order's EventSubscriber\OrderPaidSubscriber writes the buyer an Entitlement to the resource. Nothing ships: checkout asks for no address.
ResourceOffer::isShippable()
public function isShippable(): boolResourceOffer::getMaxQuantity()
public function getMaxQuantity(): ?intOne of each: a download bought twice is still one download.
ResourceOffer::getResource()
public function getResource(): ?ResourceResourceOffer::setResource()
public function setResource(?Resource $resource): selfBase\Classroom\Enum
Period enum
enum Period Period.php:6
The five periods of the French school year, between the holidays.
case P1 = 'p1'case P2 = 'p2'case P3 = 'p3'case P4 = 'p4'case P5 = 'p5'
Period::number()
public function number(): intVisibility enum
enum Visibility Visibility.php:6
Who may download a resource: anyone, the members, or whoever bought it.
case FREE = 'free'case MEMBERS = 'members'case PAID = 'paid'
Base\Classroom\EventSubscriber
OrderPaidSubscriber class
final class OrderPaidSubscriber OrderPaidSubscriber.php:27
What a paid order delivers here: an Entitlement to each resource whose offer it holds, for the buyer - and a mail with the link of the page where the files are downloaded (omnibase/marketplace's quick order page, signed: no account needed). A webhook and a redirect may both confirm the same order: an entitlement that exists is left alone, and the mail goes once.
OrderPaidSubscriber::__construct()
public function __construct(readonly EntityManagerInterface $entityManager, readonly EntitlementRepository $entitlements, readonly ?LoggerInterface $logger = null, readonly ?MailerInterface $mailer = null, readonly ?QuickOrder $quickOrder = null, readonly ?TranslatorInterface $translator = null, readonly ?string $from = null)OrderPaidSubscriber::__invoke()
public function __invoke(OrderPaidEvent $event): voidQuickOrderFilesListener class
final class QuickOrderFilesListener QuickOrderFilesListener.php:19
The page of a quick order that bought files: the files themselves, each behind a signed download link (a day), once the order is paid. The page is reached by its own signed link - shown after the payment, and mailed (OrderPaidSubscriber) - so the files are for whoever holds it.
QuickOrderFilesListener::__construct()
public function __construct(readonly Environment $twig, readonly DownloadLinks $links)QuickOrderFilesListener::__invoke()
public function __invoke(QuickOrderDoneEvent $event): voidQuickOrderFilesListener::resourcesOf()
public static function resourcesOf(Order $order): array- Returns
the files an order delivers
Base\Classroom\Repository
CardRepository class
class CardRepository extends ServiceEntityRepository CardRepository.php:12
CardRepository::__construct()
public function __construct(ManagerRegistry $registry)CardRepository::findFeatured()
public function findFeatured(int $limit = 9): arrayThe fan: the featured cards in order, then the newest, up to $limit.
@return list<Card>
CardRepository::findPublished()
public function findPublished(array $taxa = [], int $limit = 200): arrayCardRepository::findOnePublished()
public function findOnePublished(string $slug): ?CardCardRepository::search()
public function search(string $term, int $limit = 20): arrayClassifiedRepositoryTrait trait
trait ClassifiedRepositoryTrait ClassifiedRepositoryTrait.php:8
Filtering a thread query by taxa slugs: each slug given must be among the thread's taxa.
EntitlementRepository class
class EntitlementRepository extends ServiceEntityRepository EntitlementRepository.php:12
EntitlementRepository::__construct()
public function __construct(ManagerRegistry $registry)EntitlementRepository::findForUser()
public function findForUser(?object $user): array- Returns
what this person bought, newest first
EntitlementRepository::findOne()
public function findOne(?object $user, Resource $resource): ?EntitlementEntitlementRepository::countSince()
public function countSince(\DateTimeInterface $since): intSince the first of the month: how many downloads were bought.
ResourceRepository class
class ResourceRepository extends ServiceEntityRepository ResourceRepository.php:11
ResourceRepository::__construct()
public function __construct(ManagerRegistry $registry)ResourceRepository::findPublished()
public function findPublished(array $taxa = [], int $limit = 200): array- Returns
the published ones, newest first, of the taxa given
ResourceRepository::findOnePublished()
public function findOnePublished(string $slug): ?ResourceResourceRepository::search()
public function search(string $term, int $limit = 20): arrayResourceRepository::sumDownloads()
public function sumDownloads(): intSequenceRepository class
class SequenceRepository extends ServiceEntityRepository SequenceRepository.php:12
SequenceRepository::__construct()
public function __construct(ManagerRegistry $registry)SequenceRepository::findPublishedPage()
public function findPublishedPage(int $page = 1, int $perPage = 24, array $taxa = [], ?string $period = null): array- Returns
newest first, filtered by the taxa slugs given and the period
SequenceRepository::countPublished()
public function countPublished(array $taxa = [], ?string $period = null): intSequenceRepository::findLatest()
public function findLatest(int $limit = 3): arraySequenceRepository::findOnePublished()
public function findOnePublished(string $slug): ?SequenceSequenceRepository::search()
public function search(string $term, int $limit = 20): arraySequenceRepository::countDrafts()
public function countDrafts(): intSessionRepository class
class SessionRepository extends ServiceEntityRepository SessionRepository.php:10
SessionRepository::__construct()
public function __construct(ManagerRegistry $registry)Base\Classroom\Security
ResourceVoter class
final class ResourceVoter extends Voter ResourceVoter.php:19
Who may download a resource: anyone for a free one, the members (classroom.members_role) for a members' one, whoever holds an Entitlement for a paid one - and the administrators always.
const DOWNLOAD = 'CLASSROOM_DOWNLOAD'
ResourceVoter::__construct()
public function __construct(readonly Security $security, readonly EntitlementRepository $entitlements, readonly string $membersRole = 'ROLE_USER')Base\Classroom\Service
SpreadsheetPreview class
class SpreadsheetPreview SpreadsheetPreview.php:19
The first rows of a spreadsheet resource, as a table on its page: a colleague sees what the Kangourou file holds before downloading it. xlsx, xls, xlsm and ods through PhpSpreadsheet, csv read directly; the result cached until the resource changes.
SpreadsheetPreview::__construct()
public function __construct(readonly CacheInterface $cache, readonly int $rows = 30)SpreadsheetPreview::sheets()
public function sheets(Resource $resource): array- Returns
one entry per sheet (one for a csv), empty when nothing can be read
Taxa class
final class Taxa Taxa.php:11
The levels, subjects and purposes, in order, as the menus and filters list them.
Taxa::__construct()
public function __construct(readonly EntityManagerInterface $entityManager)Taxa::cycles()
public function cycles(): array- Returns
the cycles, each holding its levels
Taxa::levels()
public function levels(): array- Returns
the levels alone (CP, CE1...), in order
Taxa::subjects()
public function subjects(): array- Returns
the top subjects, each holding its domains
Taxa::purposes()
public function purposes(): arrayTaxa::level()
public function level(string $slug): ?LevelTaxa::subject()
public function subject(string $slug): ?SubjectTaxa::purpose()
public function purpose(string $slug): ?PurposeBase\Classroom\Twig
ClassroomExtension class
final class ClassroomExtension extends AbstractExtension ClassroomExtension.php:19
What a host page asks the classroom: the taxa for its menus, the cards for its fan, the latest sequences and resources.
ClassroomExtension::__construct()
public function __construct(readonly Taxa $taxa, readonly CardRepository $cards, readonly SequenceRepository $sequences, readonly ResourceRepository $resources, readonly Security $security, readonly bool $consent = false)ClassroomExtension::getFunctions()
public function getFunctions(): arrayClassroomExtension::getFilters()
public function getFilters(): array