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

YORM-Doku: Beispiel für resetSelect() #1456

Merged
merged 2 commits into from
Sep 29, 2023
Merged
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
12 changes: 12 additions & 0 deletions docs/04_yorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,18 @@ $query->whereListContains('my_column', 'my_value');
$query->whereListContains('my_column', [3, 5, 9]);
```

Beispiel für resetSelect()

// resetSelect() ermöglicht es im Anschluss per select nur die Felder des Datensatzes zu erhalten, die man wirklich benötigt.

```php
$dataset = rex_yform_manager_query::get('rex_yf_example')
->resetSelect()
->select('id')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hier wäre ein Hinweis gut, dass id notiert werden muss, da man sonst eine E_Warning erhält.

Undefined array key "id"

YForm braucht die Column intern. Egal ob man später via $dataset->getData() oder $dataset->getValue('title') die Daten abholt.

->select('title')
->select('name')
->findId($id);
```

<a name="dataset-methoden"></a>

Expand Down