Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give a more complete example for xml view generation (es, fr, ja) #7935

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions es/views/json-and-xml-views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ Un ejemplo de uso de ``XmlView`` sería generar un `sitemap.xml
que cambie ``rootNode`` y establezca atributos. Los atributos se definen
mediante el prefijo ``@``::

use Cake\View\XmlView;

public function viewClasses(): array
{
return [XmlView::class];
}

public function sitemap()
{
$pages = $this->Pages->find()->all();
Expand Down
7 changes: 7 additions & 0 deletions fr/views/json-and-xml-views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ Comme exemple d'utilisation de ``XmlView``, on peut imaginer la génération d'u
nécessite de changer ``_rootNode`` et de définir des attributs. Les attributs
sont définis en utilisant le préfixe ``@``::

use Cake\View\XmlView;

public function viewClasses(): array
{
return [XmlView::class];
}

public function sitemap()
{
$pages = $this->Pages->find()->all();
Expand Down
7 changes: 7 additions & 0 deletions ja/views/json-and-xml-views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ XmlView クラスは、XML の生成に使用するオプション(例: ``tags
このドキュメントタイプでは ``rootNode`` を変更し属性を設定する必要があります。
属性は ``@`` プレフィックスを使用して定義されます。 ::

use Cake\View\XmlView;

public function viewClasses(): array
{
return [XmlView::class];
}

public function sitemap()
{
$pages = $this->Pages->find()->all();
Expand Down