# |
Jul 18th 2017, 09:50 |
dereuromark |
You should be able to use a ArrayDatasource or sth here |
# |
Jul 18th 2017, 09:38 |
johnwayne |
I am now making so that I am collecting ids from my array and make where in $thoseIds - than I am getting "normal" cakephp pagination (if you have understood me :) ) |
# |
Jul 18th 2017, 09:36 |
johnwayne |
@dereuromark 3.3.2 |
# |
Jul 18th 2017, 09:31 |
slackebot |
!tell johnwayne about v |
# |
Jul 18th 2017, 09:31 |
slackebot |
Command sent from Slack by dereuromark: |
# |
Jul 18th 2017, 09:24 |
johnwayne |
Is there an easy way to make pagination from an array wich look 100% like cakephp object compatibile with pagination |
# |
Jul 18th 2017, 09:16 |
MartOn |
dakota - I will see.. First I will look into tests and see if its tested |
# |
Jul 18th 2017, 09:13 |
dakota |
If you figure it out, would you be able to add something to the docs? :slightly_smiling_face: |
# |
Jul 18th 2017, 09:12 |
dakota |
Probably is, most of the 2.x tree methods are well tested, but poorly documented |
# |
Jul 18th 2017, 09:12 |
MartOn |
I will se if this is tested in tests |
# |
Jul 18th 2017, 09:12 |
MartOn |
dakota - hm. |
# |
Jul 18th 2017, 09:10 |
dakota |
I have no idea if it actually works or not though |
# |
Jul 18th 2017, 09:10 |
dakota |
There is a scope config option |
# |
Jul 18th 2017, 09:10 |
dakota |
https://api.cakephp.org/2.9/source-class-TreeBehavior.html#46-49 |
# |
Jul 18th 2017, 09:09 |
MartOn |
its basically that I am looking for. I found 2 repos.. but the lack tests and did not work on my 100 000 node tree at least |
# |
Jul 18th 2017, 09:09 |
MartOn |
dakota - v2 does not support scope. AFAIK |
# |
Jul 18th 2017, 09:08 |
dakota |
Haven’t written any 2.x code for nearly 3 years |
# |
Jul 18th 2017, 09:08 |
dakota |
If I remember correctly, the 2.x behaviour works the same/similar |
# |
Jul 18th 2017, 09:08 |
dakota |
Documentation on 3.x: https://book.cakephp.org/3.0/en/orm/behaviors/tree.html#scoping-and-multi-trees |
# |
Jul 18th 2017, 09:08 |
dakota |
using the scope option |
# |
Jul 18th 2017, 09:08 |
dakota |
I think it can |
# |
Jul 18th 2017, 09:07 |
dakota |
Oh right :slightly_smiling_face: You mean multiple trees |
# |
Jul 18th 2017, 09:07 |
MartOn |
dakota - Yes. but still there is only one set of lft-rght values? |
# |
Jul 18th 2017, 09:06 |
dakota |
A root is simply a node with a parent_id of null |
# |
Jul 18th 2017, 09:06 |
MartOn |
dakota - where is that documented? |
# |
Jul 18th 2017, 09:06 |
dakota |
You can have as many roots as you want |
# |
Jul 18th 2017, 09:06 |
dakota |
It does |
# |
Jul 18th 2017, 09:06 |
dakota |
What? The tree behaviour? |
# |
Jul 18th 2017, 09:05 |
MartOn |
dakota - does it support multiple root nodes in cake 2? |
# |
Jul 18th 2017, 09:04 |
slackebot |
~slackebot |
# |
Jul 18th 2017, 09:04 |
slackebot |
Command sent from Slack by dakota: |
# |
Jul 18th 2017, 09:03 |
MartOn |
slackebot does it support multiple root nodes in cake 2? |
# |
Jul 18th 2017, 09:03 |
dakota |
Ah, MPTT trees tend to have issues with a large number of nodes |
# |
Jul 18th 2017, 09:02 |
MartOn |
not able to reproduce what is causing the corruption, so need to limit affected rows on insert. |
# |
Jul 18th 2017, 09:02 |
MartOn |
Struggling with TreeBehaviour tree corruption all the time now in a tree with approx 100 000 nodes. |
# |
Jul 18th 2017, 09:01 |
dakota |
The built in tree behaviour supports multiple root nodes |
# |
Jul 18th 2017, 09:01 |
MartOn |
Does any1 know if there is a working Nested set behaviour that supports multiple root nodes available for Cake2.x? with working tests.. |
# |
Jul 18th 2017, 08:57 |
neon1024 |
Would be `example.com/example_plugin/examples/first` |
# |
Jul 18th 2017, 08:57 |
neon1024 |
`['controller' => 'Examples', 'action' => 'first', 'plugin' => 'ExamplePlugin']` |
# |
Jul 18th 2017, 08:56 |
neon1024 |
Usually just add the plugin to your route `'plugin' => 'MyPlugin'` |
# |
Jul 18th 2017, 08:51 |
juststeveking |
How do I route to a plugin controller in cake2 |