Skip to content

Commit a75ee13

Browse files
committed
components: added info about redirect after signal [Closes #1017]
1 parent 2381d0d commit a75ee13

16 files changed

+352
-0
lines changed

application/bg/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ $this->redirect(/* ... */); // пренасочване
230230
```
231231

232232

233+
Пренасочване след сигнал .[#toc-redirection-after-a-signal]
234+
===========================================================
235+
236+
След обработката на сигнал от компонент често следва пренасочване. Тази ситуация е подобна на формулярите - след изпращане на формуляр също пренасочваме, за да предотвратим повторното изпращане на данни, когато страницата се опреснява в браузъра.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Тъй като компонентът е елемент за многократна употреба и обикновено не трябва да има пряка зависимост от конкретни презентатори, методите `redirect()` и `link()` автоматично интерпретират параметъра като сигнал за компонент:
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
Ако трябва да пренасочите към друг презентатор или действие, можете да го направите чрез презентатора:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Постоянни параметри .[#toc-persistent-parameters]
234256
=================================================
235257

application/cs/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ $this->redirect(/* ... */); // a přesměrujeme
230230
```
231231

232232

233+
Přesměrování po signálu
234+
=======================
235+
236+
Po zpracování signálu komponenty často následuje přesměrování. Je to podobná situace jako u formulářů - po jejich odeslání také přesměrováváme, aby při obnovení stránky v prohlížeči nedošlo k opětovnému odeslání dat.
237+
238+
```php
239+
$this->redirect('this') // přesměruje na aktuální presenter a action
240+
```
241+
242+
Protože komponenta je znovupoužitelný prvek a obvykle by neměla mít přímou vazbu na konkrétní presentery, metody `redirect()` a `link()` automaticky interpretují parametr jako signál komponenty:
243+
244+
```php
245+
$this->redirect('click') // přesměruje na signál 'click' téže komponenty
246+
```
247+
248+
Pokud potřebujete přesměrovat na jiný presenter či akci, můžete to udělat prostřednictvím presenteru:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // přesměruje na jiný presenter/action
252+
```
253+
254+
233255
Persistentní parametry
234256
======================
235257

application/de/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ In der Vorlage stehen diese Meldungen in der Variablen `$flashes` als Objekte `s
230230
```
231231

232232

233+
Umleitung nach einem Signal .[#toc-redirection-after-a-signal]
234+
==============================================================
235+
236+
Nach der Verarbeitung eines Komponentensignals folgt oft eine Umleitung. Diese Situation ist ähnlich wie bei Formularen - nach dem Absenden eines Formulars leiten wir ebenfalls um, um eine erneute Übermittlung von Daten zu verhindern, wenn die Seite im Browser aktualisiert wird.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Da eine Komponente ein wiederverwendbares Element ist und in der Regel keine direkte Abhängigkeit von bestimmten Presentern haben sollte, interpretieren die Methoden `redirect()` und `link()` den Parameter automatisch als Komponentensignal:
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
Wenn Sie zu einem anderen Präsentator oder einer Aktion umleiten müssen, können Sie dies über den Präsentator tun:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Dauerhafte Parameter .[#toc-persistent-parameters]
234256
==================================================
235257

application/el/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ $this->redirect(/* ... */); // και ανακατεύθυνση
230230
```
231231

232232

233+
Επανακατεύθυνση μετά από ένα σήμα .[#toc-redirection-after-a-signal]
234+
====================================================================
235+
236+
Μετά την επεξεργασία ενός σήματος συνιστωσών, ακολουθεί συχνά ανακατεύθυνση. Αυτή η κατάσταση είναι παρόμοια με τις φόρμες - μετά την υποβολή μιας φόρμας, κάνουμε επίσης ανακατεύθυνση για να αποτρέψουμε την εκ νέου υποβολή δεδομένων όταν η σελίδα ανανεώνεται στο πρόγραμμα περιήγησης.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Δεδομένου ότι ένα συστατικό είναι ένα επαναχρησιμοποιήσιμο στοιχείο και συνήθως δεν πρέπει να έχει άμεση εξάρτηση από συγκεκριμένους παρουσιαστές, οι μέθοδοι `redirect()` και `link()` ερμηνεύουν αυτόματα την παράμετρο ως σήμα συστατικού:
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
Εάν χρειάζεται να ανακατευθύνετε σε διαφορετικό παρουσιαστή ή ενέργεια, μπορείτε να το κάνετε μέσω του παρουσιαστή:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Μόνιμες παράμετροι .[#toc-persistent-parameters]
234256
================================================
235257

application/en/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ In the template, these messages are available in the variable `$flashes` as obje
230230
```
231231

232232

233+
Redirection After a Signal
234+
==========================
235+
236+
After processing a component signal, redirection often follows. This situation is similar to forms—after submitting a form, we also redirect to prevent resubmission of data when the page is refreshed in the browser.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Since a component is a reusable element and should not usually have a direct dependency on specific presenters, the `redirect()` and `link()` methods automatically interpret the parameter as a component signal:
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
If you need to redirect to a different presenter or action, you can do so through the presenter:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Persistent Parameters
234256
=====================
235257

application/es/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ En la plantilla, estos mensajes están disponibles en la variable `$flashes` com
230230
```
231231

232232

233+
Redirección tras una señal .[#toc-redirection-after-a-signal]
234+
=============================================================
235+
236+
Después de procesar una señal de componente, a menudo se produce una redirección. Esta situación es similar a la de los formularios: después de enviar un formulario, también redirigimos para evitar que se vuelvan a enviar los datos cuando se actualiza la página en el navegador.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Dado que un componente es un elemento reutilizable y, por lo general, no debería tener una dependencia directa de presentadores específicos, los métodos `redirect()` y `link()` interpretan automáticamente el parámetro como una señal de componente:
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
Si necesita redirigir a un presentador o acción diferente, puede hacerlo a través del presentador:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Parámetros persistentes .[#toc-persistent-parameters]
234256
=====================================================
235257

application/fr/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ Dans le modèle, ces messages sont disponibles dans la variable `$flashes` sous
230230
```
231231

232232

233+
Redirection après un signal .[#toc-redirection-after-a-signal]
234+
==============================================================
235+
236+
Le traitement d'un signal de composant est souvent suivi d'une redirection. Cette situation est similaire à celle des formulaires : après avoir soumis un formulaire, nous redirigeons également les données pour éviter qu'elles ne soient soumises à nouveau lorsque la page est rafraîchie dans le navigateur.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Étant donné qu'un composant est un élément réutilisable et qu'il ne doit généralement pas dépendre directement de présentateurs spécifiques, les méthodes `redirect()` et `link()` interprètent automatiquement le paramètre comme un signal de composant :
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
Si vous devez rediriger vers un autre présentateur ou une autre action, vous pouvez le faire par l'intermédiaire du présentateur :
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Paramètres persistants .[#toc-persistent-parameters]
234256
====================================================
235257

application/hu/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ A sablonban ezek az üzenetek a `$flashes` változóban állnak rendelkezésre,
230230
```
231231

232232

233+
Átirányítás jelzést követően .[#toc-redirection-after-a-signal]
234+
===============================================================
235+
236+
Egy komponensjel feldolgozása után gyakran következik az átirányítás. Ez a helyzet hasonló az űrlapokhoz - egy űrlap elküldése után mi is átirányítunk, hogy megakadályozzuk az adatok újbóli elküldését, amikor az oldal frissül a böngészőben.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Mivel a komponens egy újrafelhasználható elem, és általában nem szabad, hogy közvetlen függőségben álljon az egyes prezenterektől, a `redirect()` és a `link()` metódusok automatikusan komponensjelként értelmezik a paramétert:
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
Ha át kell irányítani egy másik prezenterre vagy műveletre, akkor ezt a prezenteren keresztül teheti meg:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Állandó paraméterek .[#toc-persistent-parameters]
234256
=================================================
235257

application/it/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ Nel modello, questi messaggi sono disponibili nella variabile `$flashes` come og
230230
```
231231

232232

233+
Reindirizzamento dopo un segnale .[#toc-redirection-after-a-signal]
234+
===================================================================
235+
236+
Dopo l'elaborazione di un segnale di un componente, spesso segue un reindirizzamento. Questa situazione è simile a quella dei moduli: dopo l'invio di un modulo, si effettua un reindirizzamento per evitare che i dati vengano inviati nuovamente quando la pagina viene aggiornata nel browser.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Poiché un componente è un elemento riutilizzabile e di solito non dovrebbe avere una dipendenza diretta da presentatori specifici, i metodi `redirect()` e `link()` interpretano automaticamente il parametro come un segnale di componente:
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
Se è necessario reindirizzare a un presentatore o a un'azione diversa, lo si può fare attraverso il presentatore:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Parametri persistenti .[#toc-persistent-parameters]
234256
===================================================
235257

application/pl/components.texy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,28 @@ Do szablonu wiadomości te są dostępne w zmiennej `$flashes` jako obiekty `std
230230
```
231231

232232

233+
Przekierowanie po sygnale .[#toc-redirection-after-a-signal]
234+
============================================================
235+
236+
Po przetworzeniu sygnału komponentu często następuje przekierowanie. Sytuacja ta jest podobna do formularzy - po przesłaniu formularza również przekierowujemy, aby zapobiec ponownemu przesłaniu danych po odświeżeniu strony w przeglądarce.
237+
238+
```php
239+
$this->redirect('this') // redirects to the current presenter and action
240+
```
241+
242+
Ponieważ komponent jest elementem wielokrotnego użytku i zwykle nie powinien mieć bezpośredniej zależności od konkretnych prezenterów, metody `redirect()` i `link()` automatycznie interpretują parametr jako sygnał komponentu:
243+
244+
```php
245+
$this->redirect('click') // redirects to the 'click' signal of the same component
246+
```
247+
248+
Jeśli konieczne jest przekierowanie do innego prezentera lub akcji, można to zrobić za pośrednictwem prezentera:
249+
250+
```php
251+
$this->getPresenter()->redirect('Product:show'); // redirects to a different presenter/action
252+
```
253+
254+
233255
Trwałe parametry .[#toc-persistent-parameters]
234256
==============================================
235257

0 commit comments

Comments
 (0)