Closed mehov closed 2 hours ago
It would usually be an array with the id as integer key and the value as the tag name https://github.com/dereuromark/cakephp-sandbox/blob/bd1cc599ca6ad6862c969fac5fba66ca60b0cb60/plugins/Sandbox/src/Controller/TagsController.php#L77
Feel free to make a PR to fix the docs once you got it up and running.
Alright, I just did the simplest possible $tagList = $this->Tags->find('list')->toArray()
and it worked perfectly
@mehov You should perhaps start by doing the tutorials first. This section shows exactly what you are asking https://book.cakephp.org/5/en/tutorials-and-examples/cms/tags-and-users.html#updating-articles-to-enable-tagging.
We can't go about adding every detail in every section of the manual.
P.S You can also use one of the support forums instead of opening Github issues if you need help with something.
P.S You can also use one of the support forums instead of opening Github issues if you need help with something.
I wasn't asking for help and I found my answer myself anyway. (Although I say thank you to dereuromark for reacting very quick, probably too quick, I just haven't seen the message in time.)
I merely pointed out that the documentation could be clearer. That would lead to a better developer experience for everyone who uses it.
No need to get irritated.
Can see now that you updated the docs. Thank you.
What shoud $tagList look like?
This very much sounds like you were asking for help rather that suggesting improvement to the docs.
https://book.cakephp.org/5/en/views/helpers/form.html#creating-inputs-for-associated-data
What shoud
$tagList
look like? I searched that page for$tagList
but there's no other mention.I could only find https://discourse.cakephp.org/t/checkbox-checked-for-multiple-select-input-for-belongs-to-many-associations-solved/4273 via site:cakephp.org "$tagList"