# |
Nov 30th 2017, 20:06 |
saeideng |
dereuromark I opened a Issue about date |
# |
Nov 30th 2017, 19:43 |
saeideng |
_name |
# |
Nov 30th 2017, 19:34 |
angelxmoreno |
oh snap, we got named routes in Cake now? :scream: |
# |
Nov 30th 2017, 19:00 |
dereuromark |
I made a PR to not move those into 404, @mail |
# |
Nov 30th 2017, 18:50 |
angelxmoreno |
@saeideng it works ! |
# |
Nov 30th 2017, 18:50 |
angelxmoreno |
https://pics.me.me/let-me-show-you-my-shocked-face-quitmemes-com-14212859.png |
# |
Nov 30th 2017, 18:49 |
saeideng |
`plugins/BootstrapTheme/src/Template/Layout/default.ctp` |
# |
Nov 30th 2017, 18:49 |
saeideng |
Template |
# |
Nov 30th 2017, 18:49 |
saeideng |
`Templates` no |
# |
Nov 30th 2017, 18:48 |
angelxmoreno |
on it |
# |
Nov 30th 2017, 18:48 |
saeideng |
no |
# |
Nov 30th 2017, 18:48 |
saeideng |
oh |
# |
Nov 30th 2017, 18:48 |
saeideng |
:slightly_smiling_face: |
# |
Nov 30th 2017, 18:48 |
saeideng |
just test it |
# |
Nov 30th 2017, 18:48 |
angelxmoreno |
not before render ? |
# |
Nov 30th 2017, 18:48 |
saeideng |
in beforeFilter |
# |
Nov 30th 2017, 18:48 |
saeideng |
set ` $this->viewBuilder()->setTheme('BootstrapTheme');` |
# |
Nov 30th 2017, 18:46 |
angelxmoreno |
Pretty sure I read https://book.cakephp.org/3.0/en/views/themes.html thoroughly |
# |
Nov 30th 2017, 18:40 |
slackebot2 |
out in `plugins/BootstrapTheme/src/Templates/Layout/default.ctp` Why no workie? |
# |
Nov 30th 2017, 18:40 |
slackebot2 |
// Note: These defaults are just to get started quickly with development // and should not be used in production. You should instead set "_serialize" // in each action as required. if (!array_key_exists('_serialize', $this->viewVars) andand in_array($this->response->type(), ['application/json', 'application/xml']) ) { $this->set('_serialize', true); } } ``` 3. created a new lay |
# |
Nov 30th 2017, 18:40 |
angelxmoreno |
greetings bakers! I need help getting themes to work on CakePHP 3.5.6 1. Baked a plugin called `BootstrapTheme` 2. Added this to my AppController `beforeRender`: ``` /** * Before render callback. * * @param \Cake\Event\Event $event The beforeRender event. * @return \Cake\Http\Response|null|void */ public function beforeRender(Event $event) { $this->viewBuilder()->setTheme('BootstrapTheme'); |
# |
Nov 30th 2017, 18:39 |
dereuromark |
angel in the house |
# |
Nov 30th 2017, 18:37 |
inoas |
input field company; value true ;) |
# |
Nov 30th 2017, 18:37 |
inoas |
the biggest problem is simply users entering true, false, null |
# |
Nov 30th 2017, 18:35 |
inoas |
any other get/post data is just trimmed |
# |
Nov 30th 2017, 18:35 |
inoas |
which I use whenever I consume non-user data |
# |
Nov 30th 2017, 18:34 |
inoas |
dereuromark followed your advice and split my Middleware that detected types like so $this->request = (new DetectRequestDataTypesTransformer())->withTypedData($this->request); |
# |
Nov 30th 2017, 18:13 |
saeideng |
has anyone in here to use non-gregorian |
# |
Nov 30th 2017, 18:12 |
saeideng |
and $now->i18nFormat for converting gregorian into non-gregorian ( for showing ) |
# |
Nov 30th 2017, 18:11 |
saeideng |
I now use other package for converting non-gregorian into gregorian |
# |
Nov 30th 2017, 18:10 |
dereuromark |
you can always start small with a plugin or sth until it stabilizes :slightly_smiling_face: |
# |
Nov 30th 2017, 18:09 |
saeideng |
maybe in chronos or i18n |
# |
Nov 30th 2017, 18:09 |
saeideng |
If yes hope to add this in core |
# |
Nov 30th 2017, 18:08 |
saeideng |
I think cake not support parse date for non-gregorian |
# |
Nov 30th 2017, 18:08 |
saeideng |
I need now parse date |
# |
Nov 30th 2017, 18:07 |
saeideng |
`$result = $now->i18nFormat(\IntlDateFormatter::FULL, null, 'en-IR@calendar=persian');` works for me |
# |
Nov 30th 2017, 18:06 |
dereuromark |
maybe this needs to be installed, or requires newer intl, that lib in general is a bid unreliable in that regards |
# |
Nov 30th 2017, 18:04 |
saeideng |
DateTimeZone::__construct(): Unknown or bad timezone (en-IR@calendar=persian) |
# |
Nov 30th 2017, 18:04 |
saeideng |
error omit |
# |
Nov 30th 2017, 18:03 |
saeideng |
but I try to `Time::parse('1396-09-09','en-IR@calendar=persian');` |
# |
Nov 30th 2017, 18:03 |
saeideng |
`Time::parse($nonGregorianDate, $localeOptions)` |