Skip to content

Commit

Permalink
Merge pull request #22 from froschdesign/hotfix/docs/installation-req…
Browse files Browse the repository at this point in the history
…uirements

Adds missing installation requirements as snippets and inserts it into all pages
  • Loading branch information
gsteel authored Dec 15, 2022
2 parents 9073eb8 + a69ce41 commit f2e20ea
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/book/element/phone-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

`Laminas\I18n\PhoneNumber\Form\Element\PhoneNumber` is a text input form element that automatically attaches a PhoneNumber validator.

--8<-- "installation-requirements.md"

## Basic Usage

This element automatically adds a `type` attribute of value `tel`.
Expand Down
2 changes: 2 additions & 0 deletions docs/book/filters/to-e164.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

The `ToE164` filter can be used to format phone numbers to [E.164 format](https://en.wikipedia.org/wiki/E.164).

--8<-- "installation-requirements.md"

## Basic Usage

```php
Expand Down
2 changes: 2 additions & 0 deletions docs/book/filters/to-international-phone-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

The `ToInternationalPhoneNumber` filter can be used to format phone numbers to the international format expected by the region the phone number belongs to.

--8<-- "installation-requirements.md"

## Basic Usage

```php
Expand Down
2 changes: 2 additions & 0 deletions docs/book/filters/to-national-phone-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

The `ToNationalPhoneNumber` filter can be used to format phone numbers to the national format expected by the region the phone number belongs to.

--8<-- "installation-requirements.md"

## Basic Usage

```php
Expand Down
2 changes: 2 additions & 0 deletions docs/book/helper/phone-number-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

The `Laminas\I18n\PhoneNumber\View\Helper\PhoneNumberFormat` view helper provides a convenient way of formatting phone numbers in projects that make use of [`laminas/laminas-view`](https://docs.laminas.dev/laminas-view/).

--8<-- "installation-requirements.md"

## Basic Usage

The helper is aliased to `phoneNumberFormat` so within view scripts, it can be invoked in the following way:
Expand Down
2 changes: 2 additions & 0 deletions docs/book/validators/phone-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
`Laminas\I18n\PhoneNumber\Validator\PhoneNumber` allows you to determine if a given value **is a valid phone number**.
Phone number formats are country specific.

--8<-- "installation-requirements.md"

## Basic Usage

```php
Expand Down
6 changes: 6 additions & 0 deletions docs/snippets/installation-requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
> MISSING: **Installation Requirements**
> The support for phone numbers is based on the laminas-i18n-phone-number component, so be sure to have it installed before getting started:
>
> ```bash
> $ composer require laminas/laminas-i18n-phone-number
> ```

0 comments on commit f2e20ea

Please sign in to comment.