Extension:Page Forms/Developers' documentation/fr

Cette page contient des informations sur le code, pour les développeurs qui veulent mieux le comprendre, le modifier ou créer du code qui s'y rapporte.

Code
To view the code online, including version history for each file, you can go here.



Modifier ou améliorer Page Forms
There's certainly no shortage of ways to improve, including bugs that can be fixed, interface elements that can be improved, or new features that can be added. If you are a developer, or simply a user with some technical skill, any help you can provide in improving the software is welcome: would not be at its current state without the contributions of many people.

If you encounter some issue or limitation in, and have an interest in fixing it, please either write Yaron, write about it on the talk page, or post a task on Phabricator.

You can also see the current list of Known bugs and planned features.



Définir de nouvelles entrées
To create a new input type, you need to define a class for that input, and have it inherit (using the "extends" keyword) from the class PFFormInput, or one of its child classes. There are a number of methods that this class can or should define; the following are the crucial ones:


 * - sets the name of the input within the form definition.
 * - defines which parameters can be be passed in to this input, for use within Special:CreateForm.
 * - génère le HTML pour afficher cette entrée
 * - sets the name(s) of the ResourceLoader modules used by this input; if the input contains any JavaScript or CSS, they should be packaged into one or more modules, which are then specified here.

Les autres méthodes pouvant être redéfinies sont :

Il est utile de regarder les classes d'entrée de formulaire existantes, pour voir comment toutes ces fonctions sont appelées.

Une note pour obtenir d'autres paramètres : disons que votre entrée est nommée myinput, et qu'elle est appelée dans la définition du formulaire de la manière suivante :

Within your class's  method,   will contain the "color=orange" and "height=200" key-value pairs, which the function can then use however it wants.

Finally, once your new input is defined, it needs to be registered. You do that by using the  hook. You need to register with that hook a function that looks like the following:

Tester
You can find information on testing the code at the page Testing.