Log message #4044579

# At Username Text
# Jun 27th 2017, 09:03 hmic they can do the hosting for a *small* fee!
# Jun 27th 2017, 09:02 savant :slightly_smiling_face:
# Jun 27th 2017, 09:02 savant and you want me to maintain a chat application with high availability? thanks but no thanks
# Jun 27th 2017, 09:02 savant hmic: I gave a talk on why I dont have time to maintain servers
# Jun 27th 2017, 09:02 hmic http://www.mattermost.com/
# Jun 27th 2017, 09:02 hmic you can even import slack history now
# Jun 27th 2017, 09:02 savant i have a few open PRs for it as well, they should be merged this week
# Jun 27th 2017, 09:02 hmic savant: give up on slack and use mattermost, it does the same and is OSS :P
# Jun 27th 2017, 09:02 savant @rudy1976s docs for crud-view if you want: https://crud-view.readthedocs.io/en/latest/
# Jun 27th 2017, 09:02 rudy1976s @savant I would look at your approach, it sounds pretty interestinfg
# Jun 27th 2017, 09:01 savant hmic: join the dark side of slack
# Jun 27th 2017, 09:01 hmic it's just awefull in irc and very disturbing in that size
# Jun 27th 2017, 09:01 savant its probably not exactly what you’re looking for, @rudy1976s, but somewhat related problem
# Jun 27th 2017, 09:01 savant hmic: maybe later
# Jun 27th 2017, 09:01 hmic :D
# Jun 27th 2017, 09:01 hmic !tell savant about gist
# Jun 27th 2017, 09:01 savant basically just configuring it
# Jun 27th 2017, 09:00 slackebot $this->Crud->action()->config('scaffold.index_formats', [ 'CSV' => Router::url(['_ext' => 'csv', '?' => $this->request->query]), 'JSON' => Router::url(['_ext' => 'json', '?' => $this->request->query]), 'XML' => Router::url(['_ext' => 'xml', '?' => $this->request->query]), ]); $this->Crud->action()->config('scaffold.fields', $fields); return $this->Crud->execute(); } ```
# Jun 27th 2017, 09:00 slackebot __('All') => 'all', __('Missing Maintainer') => 'missingMaintainer', __('Uncategorized') => 'uncategorized', __('No version set') => 'unversioned', ]); if (in_array($this->request->query('finder'), ['missingMaintainer', 'uncategorized', 'unversioned'])) { $this->Crud->action()->config('findMethod', $this->request->query('finder')); }
# Jun 27th 2017, 09:00 savant ``` public function index() { $fields = [ 'id', 'maintainer_id', 'name', 'repository_url', 'tags', 'category_id' ]; if ($this->request->getParam('_ext') === 'csv') { $this->set('_serialize', ['packages']); $this->set('_extract', $fields); } $this->Crud->action()->config('scaffold.index_finder_scopes',
# Jun 27th 2017, 09:00 savant here is the code for that particular index action
# Jun 27th 2017, 09:00 savant can link actions etc, have scoped filters
# Jun 27th 2017, 09:00 savant i get csv/json/xml export support
# Jun 27th 2017, 09:00 savant https://cl.ly/2G3G133C2Q3z
# Jun 27th 2017, 09:00 savant anyhow, re: crud, this is the sort of thing I’m doing
# Jun 27th 2017, 08:59 savant you pass in your table and deal with just the wrapper class
# Jun 27th 2017, 08:59 savant that is basically your data provider
# Jun 27th 2017, 08:59 savant that or build a wrapper class
# Jun 27th 2017, 08:59 savant then you have strong cohesion
# Jun 27th 2017, 08:59 savant I think if you want to treat a specific table as a “type” of thing, you should build an interface and attach it where necessary
# Jun 27th 2017, 08:58 savant I’ve been leaning heavily on crud-view recently - @dakota mentioned it above - and it helps build out administrative patterns
# Jun 27th 2017, 08:58 savant I dont really use that sort of approach per-se
# Jun 27th 2017, 08:56 rudy1976s I found that approach very useful for displaying data
# Jun 27th 2017, 08:56 rudy1976s http://www.yiiframework.com/doc-2.0/guide-output-data-providers.html
# Jun 27th 2017, 08:56 rudy1976s exactly
# Jun 27th 2017, 08:55 savant but automatically without needing to rebake things, is that correct?
# Jun 27th 2017, 08:55 savant sort of like bake?
# Jun 27th 2017, 08:55 rudy1976s Yii2 uses the dataprovider which is able to receive a query and display in a widget with the according fields result of the query with its label in a list or grid fashion
# Jun 27th 2017, 08:54 rudy1976s I am thinking of this because of my recent Yii2 experience, which was really complicated for me coming from cake way of thinking ( which I still prefer) but the dataprovider concept was very useful )
# Jun 27th 2017, 08:53 savant im guessing you’re trying to automatically generate admin panels?
# Jun 27th 2017, 08:53 savant can you point me to where yii2 has this “label” functionality?