Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 51570c9

Browse files
author
Olivier Lechevalier
committed
Fix bullet list in documentation
1 parent 9fcbb72 commit 51570c9

File tree

5 files changed

+59
-59
lines changed

5 files changed

+59
-59
lines changed

book/zend.form.collections.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,14 @@ entity.
419419

420420
This element has a few interesting options:
421421

422-
- `count`: this is how many times the element (in this case a category) has to be rendered. We've
422+
* `count`: this is how many times the element (in this case a category) has to be rendered. We've
423423
set it to two in this examples.
424-
- `should_create_template`: if set to `true`, it will generate a template markup in a `<span>`
424+
* `should_create_template`: if set to `true`, it will generate a template markup in a `<span>`
425425
element, in order to simplify adding new element on the fly (we will speak about this one later).
426-
- `allow_add`: if set to `true` (which is the default), dynamically added elements will be retrieved
426+
* `allow_add`: if set to `true` (which is the default), dynamically added elements will be retrieved
427427
and validated; otherwise, they will be completely ignored. This, of course, depends on what you want
428428
to do.
429-
- `target_element`: this is either an element or, as this is the case in this example, an array that
429+
* `target_element`: this is either an element or, as this is the case in this example, an array that
430430
describes the element or fieldset that will be used in the collection. In this case, the
431431
`target_element` is a `Category` fieldset.
432432

@@ -550,10 +550,10 @@ echo $this->form()->closeTag();
550550

551551
A few new things here :
552552

553-
- the `prepare()` method. You *must* call it prior to rendering anything in the view (this function
553+
* the `prepare()` method. You *must* call it prior to rendering anything in the view (this function
554554
is only meant to be called in views, not in controllers).
555-
- the `FormRow` helper renders a label (if present), the input itself, and errors.
556-
- the `FormCollection` helper will iterate through every element in the collection, and render every
555+
* the `FormRow` helper renders a label (if present), the input itself, and errors.
556+
* the `FormCollection` helper will iterate through every element in the collection, and render every
557557
element with the FormRow helper (you may specify an alternate helper if desired, using the
558558
`setElementHelper()` method on that `FormCollection` helper instance). If you need more control
559559
about the way you render your forms, you can iterate through the elements in the collection, and
@@ -629,7 +629,7 @@ The `add_category` function is fairly simple:
629629

630630
Here is the code:
631631

632-
```php
632+
```javascript
633633
<script>
634634
function add_category() {
635635
var currentCount = $('form > fieldset > fieldset').length;
@@ -678,11 +678,11 @@ $this->add(array(
678678

679679
There are some limitations to this capability:
680680

681-
- Although you can add new elements and remove them, you *CANNOT* remove more elements in a
681+
* Although you can add new elements and remove them, you *CANNOT* remove more elements in a
682682
collection than the initial count (for instance, if your code specifies `count == 2`, you will be
683683
able to add a third one and remove it, but you won't be able to remove any others. If the initial
684684
count is 2, you *must* have at least two elements.
685-
- Dynamically added elements have to be added at the end of the collection. They can be added
685+
* Dynamically added elements have to be added at the end of the collection. They can be added
686686
anywhere (these elements will still be validated and inserted into the entity), but if the
687687
validation fails, this newly added element will be automatically be replaced at the end of the
688688
collection.

book/zend.form.elements.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -498,13 +498,13 @@ $form->add(array(
498498
In order to set attributes or customize the option elements, an array can be used instead of a
499499
string. The following keys are supported:
500500

501-
- `"label"` - The string displayed for the option.
502-
- `"value"` - The form value associated with the option.
503-
- `"selected"` - Boolean that sets whether the option is marked as selected.
504-
- `"disabled"` - Boolean that sets whether the option will be disabled
505-
- `"attributes"` - Array of html attributes that will be set on this option. Merged with the
501+
* `"label"` - The string displayed for the option.
502+
* `"value"` - The form value associated with the option.
503+
* `"selected"` - Boolean that sets whether the option is marked as selected.
504+
* `"disabled"` - Boolean that sets whether the option will be disabled
505+
* `"attributes"` - Array of html attributes that will be set on this option. Merged with the
506506
attributes set on the element.
507-
- `"label_attributes"` - Array of html attributes that will be set on the label. Merged with the
507+
* `"label_attributes"` - Array of html attributes that will be set on the label. Merged with the
508508
attributes set on the element's label.
509509

510510
```php

book/zend.form.file-upload.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ processing, but with some slight caveats that will be described below.
2323

2424
In this example we will:
2525

26-
- Define a **Form** for backend validation and filtering.
27-
- Create a **view template** with a `<form>` containing a file input.
28-
- Process the form within a **Controller action**.
26+
* Define a **Form** for backend validation and filtering.
27+
* Create a **view template** with a `<form>` containing a file input.
28+
* Process the form within a **Controller action**.
2929

3030
### The Form and InputFilter
3131

@@ -58,11 +58,11 @@ class UploadForm extends Form
5858

5959
The `File` element provides some automatic features that happen behind the scenes:
6060

61-
- The form's `enctype` will automatically be set to `multipart/form-data` when the form `prepare()`
61+
* The form's `enctype` will automatically be set to `multipart/form-data` when the form `prepare()`
6262
method is called.
63-
- The file element's default input specification will create the correct `Input` type:
63+
* The file element's default input specification will create the correct `Input` type:
6464
\[Zend\\InputFilter\\FileInput\](zend.input-filter.file-input).
65-
- The `FileInput` will automatically prepend an \[UploadFile
65+
* The `FileInput` will automatically prepend an \[UploadFile
6666
Validator\](zend.validator.file.upload-file), to securely validate that the file is actually an
6767
uploaded file, and to report other types of upload errors to the user.
6868

@@ -294,10 +294,10 @@ information on its supported options.
294294

295295
Behind the scenes, the `FilePRG` plugin will:
296296

297-
- Run the Form's filters, namely the `RenameUpload` filter, to move the files out of temporary
297+
* Run the Form's filters, namely the `RenameUpload` filter, to move the files out of temporary
298298
storage.
299-
- Store the valid POST data in the session across requests.
300-
- Change the `required` flag of any file inputs that had valid uploads to `false`. This is so that
299+
* Store the valid POST data in the session across requests.
300+
* Change the `required` flag of any file inputs that had valid uploads to `false`. This is so that
301301
form re-submissions without uploads will not cause validation errors.
302302

303303
> ## Note
@@ -641,17 +641,17 @@ public function uploadFormAction()
641641

642642
Related documentation:
643643

644-
- \[Form File Element\](zend.form.element.file)
645-
- \[Form File View Helper\](zend.form.view.helper.form-file)
646-
- \[List of File Validators\](zend.validator.file)
647-
- \[List of File Filters\](zend.filter.file)
648-
- \[File Post-Redirect-Get Controller Plugin\](zend.mvc.controller-plugins.file-postredirectget)
649-
- \[Zend\\InputFilter\\FileInput\](zend.input-filter.file-input)
650-
- \[Upload Progress Handlers\](zend.progress-bar.upload)
651-
- \[Upload Progress View Helpers\](zend.form.view.helper.file)
644+
* \[Form File Element\](zend.form.element.file)
645+
* \[Form File View Helper\](zend.form.view.helper.form-file)
646+
* \[List of File Validators\](zend.validator.file)
647+
* \[List of File Filters\](zend.filter.file)
648+
* \[File Post-Redirect-Get Controller Plugin\](zend.mvc.controller-plugins.file-postredirectget)
649+
* \[Zend\\InputFilter\\FileInput\](zend.input-filter.file-input)
650+
* \[Upload Progress Handlers\](zend.progress-bar.upload)
651+
* \[Upload Progress View Helpers\](zend.form.view.helper.file)
652652

653653
External resources and blog posts from the community:
654654

655-
- [ZF2FileUploadExamples](https://github.com/cgmartin/ZF2FileUploadExamples) : A ZF2 module with
655+
* [ZF2FileUploadExamples](https://github.com/cgmartin/ZF2FileUploadExamples) : A ZF2 module with
656656
several file upload examples.
657657

book/zend.form.intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ and a small number of methods for binding data to and from the form and attached
66

77
The `Zend\Form` component consists of the following objects:
88

9-
- `Elements`, which simply consist of a name and attributes.
10-
- `Fieldsets`, which extend from `Elements`, but allow composing other fieldsets and elements.
11-
- `Forms`, which extend from `Fieldsets` (and thus `Elements`). They provide data and object
9+
* `Elements`, which simply consist of a name and attributes.
10+
* `Fieldsets`, which extend from `Elements`, but allow composing other fieldsets and elements.
11+
* `Forms`, which extend from `Fieldsets` (and thus `Elements`). They provide data and object
1212
binding, and compose \[InputFilters\](zend.input-filter.intro). Data binding is done via
1313
\[Zend\\Stdlib\\Hydrator\](zend.stdlib.hydrator).
1414

book/zend.form.quick-start.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ class SenderFieldset extends Fieldset implements InputFilterProviderInterface
519519
),
520520
'validators' => array(
521521
array(
522-
'name' => 'Zend\Validator\StringLength',
522+
'name' => 'Zend\Validator\StringLength',
523523
'options' => array(
524524
'min' => 3,
525525
'max' => 256
@@ -560,15 +560,15 @@ that in action.
560560

561561
When you `bind()` an object to the form, the following happens:
562562

563-
- The composed `Hydrator` calls `extract()` on the object, and uses the values returned, if any, to
563+
* The composed `Hydrator` calls `extract()` on the object, and uses the values returned, if any, to
564564
populate the `value` attributes of all elements. If a form contains a fieldset that itself contains
565565
another fieldset, the form will recursively extract the values.
566-
- When `isValid()` is called, if `setData()` has not been previously set, the form uses the composed
566+
* When `isValid()` is called, if `setData()` has not been previously set, the form uses the composed
567567
`Hydrator` to extract values from the object, and uses those during validation.
568-
- If `isValid()` is successful (and the `bindOnValidate` flag is enabled, which is true by default),
568+
* If `isValid()` is successful (and the `bindOnValidate` flag is enabled, which is true by default),
569569
then the `Hydrator` will be passed the validated values to use to hydrate the bound object. (If you
570570
do not want this behavior, call `setBindOnValidate(FormInterface::BIND_MANUAL)`).
571-
- If the object implements `Zend\InputFilter\InputFilterAwareInterface`, the input filter it
571+
* If the object implements `Zend\InputFilter\InputFilterAwareInterface`, the input filter it
572572
composes will be used instead of the one composed on the form.
573573

574574
This is easier to understand in practice.
@@ -856,45 +856,45 @@ have a central place to define all of these?
856856
Annotations allow us to solve this problem. You can define the following behaviors with the shipped
857857
annotations in `Zend\Form`:
858858

859-
- *AllowEmpty*: mark an input as allowing an empty value. This annotation does not require a value.
860-
- *Attributes*: specify the form, fieldset, or element attributes. This annotation requires an
859+
* *AllowEmpty*: mark an input as allowing an empty value. This annotation does not require a value.
860+
* *Attributes*: specify the form, fieldset, or element attributes. This annotation requires an
861861
associative array of values, in a JSON object format:
862862
`@Attributes({"class":"zend_form","type":"text"})`.
863-
- *ComposedObject*: specify another object with annotations to parse. Typically, this is used if a
863+
* *ComposedObject*: specify another object with annotations to parse. Typically, this is used if a
864864
property references another object, which will then be added to your form as an additional fieldset.
865865
Expects a string value indicating the class for the object being composed
866866
`@ComposedObject("Namespace\Model\ComposedObject")` or an array to compose a collection:
867867
`@ComposedObject({ "target_object":"Namespace\Model\ComposedCollection", "is_collection":"true",
868868
"options":{"count":2}})` `target_object` is the element to compose, `is_collection` flags this as a
869869
collection and `options` can take an array of options to pass into the collection.
870-
- *ErrorMessage*: specify the error message to return for an element in the case of a failed
870+
* *ErrorMessage*: specify the error message to return for an element in the case of a failed
871871
validation. Expects a string value.
872-
- *Exclude*: mark a property to exclude from the form or fieldset. This annotation does not require
872+
* *Exclude*: mark a property to exclude from the form or fieldset. This annotation does not require
873873
a value.
874-
- *Filter*: provide a specification for a filter to use on a given element. Expects an associative
874+
* *Filter*: provide a specification for a filter to use on a given element. Expects an associative
875875
array of values, with a "name" key pointing to a string filter name, and an "options" key pointing
876876
to an associative array of filter options for the constructor: `@Filter({"name": "Boolean",
877877
"options": {"casting":true}})`. This annotation may be specified multiple times.
878-
- *Flags*: flags to pass to the fieldset or form composing an element or fieldset; these are usually
878+
* *Flags*: flags to pass to the fieldset or form composing an element or fieldset; these are usually
879879
used to specify the name or priority. The annotation expects an associative array:
880880
`@Flags({"priority": 100})`.
881-
- *Hydrator*: specify the hydrator class to use for this given form or fieldset. A string value is
881+
* *Hydrator*: specify the hydrator class to use for this given form or fieldset. A string value is
882882
expected.
883-
- *InputFilter*: specify the input filter class to use for this given form or fieldset. A string
883+
* *InputFilter*: specify the input filter class to use for this given form or fieldset. A string
884884
value is expected.
885-
- *Input*: specify the input class to use for this given element. A string value is expected.
886-
- *Instance*: specify an object class instance to bind to the form or fieldset.
887-
- *Name*: specify the name of the current element, fieldset, or form. A string value is expected.
888-
- *Object*: specify an object class instance to bind to the form or fieldset. (Note: this is
885+
* *Input*: specify the input class to use for this given element. A string value is expected.
886+
* *Instance*: specify an object class instance to bind to the form or fieldset.
887+
* *Name*: specify the name of the current element, fieldset, or form. A string value is expected.
888+
* *Object*: specify an object class instance to bind to the form or fieldset. (Note: this is
889889
deprecated in 2.4.0; use *Instance* instead.)
890-
- *Options*: options to pass to the fieldset or form that are used to inform behavior -- things that
890+
* *Options*: options to pass to the fieldset or form that are used to inform behavior -- things that
891891
are not attributes; e.g. labels, CAPTCHA adapters, etc. The annotation expects an associative array:
892892
`@Options({"label": "Username:"})`.
893-
- *Required*: indicate whether an element is required. A boolean value is expected. By default, all
893+
* *Required*: indicate whether an element is required. A boolean value is expected. By default, all
894894
elements are required, so this annotation is mainly present to allow disabling a requirement.
895-
- *Type*: indicate the class to use for the current element, fieldset, or form. A string value is
895+
* *Type*: indicate the class to use for the current element, fieldset, or form. A string value is
896896
expected.
897-
- *Validator*: provide a specification for a validator to use on a given element. Expects an
897+
* *Validator*: provide a specification for a validator to use on a given element. Expects an
898898
associative array of values, with a "name" key pointing to a string validator name, and an "options"
899899
key pointing to an associative array of validator options for the constructor: `@Validator({"name":
900900
"StringLength", "options": {"min":3, "max": 25}})`. This annotation may be specified multiple times.

0 commit comments

Comments
 (0)