# |
Sep 6th 2019, 20:18 |
ricksaccous |
lol |
# |
Sep 6th 2019, 20:18 |
ricksaccous |
pretty much a rewrite |
# |
Sep 6th 2019, 20:18 |
ricksaccous |
might not be too bad, but it might also be bad |
# |
Sep 6th 2019, 20:18 |
ricksaccous |
depending on how big it is |
# |
Sep 6th 2019, 20:17 |
alexdd55976 |
:exploding_head: |
# |
Sep 6th 2019, 20:17 |
alexdd55976 |
migrate to 4.0 |
# |
Sep 6th 2019, 20:17 |
alexdd55976 |
LOL |
# |
Sep 6th 2019, 20:17 |
ricksaccous |
just so you can upgrade php version |
# |
Sep 6th 2019, 20:17 |
ricksaccous |
lol |
# |
Sep 6th 2019, 20:17 |
ricksaccous |
you should upgrade one day |
# |
Sep 6th 2019, 20:17 |
ricksaccous |
dang dude that's awesome |
# |
Sep 6th 2019, 20:15 |
alexdd55976 |
cake1.3 is still a beast |
# |
Sep 6th 2019, 20:15 |
alexdd55976 |
12k products |
# |
Sep 6th 2019, 20:15 |
alexdd55976 |
10k customers |
# |
Sep 6th 2019, 20:14 |
alexdd55976 |
almost 4 million orders, stills super fast |
# |
Sep 6th 2019, 20:14 |
alexdd55976 |
i am seriously happy with that shop |
# |
Sep 6th 2019, 20:13 |
alexdd55976 |
yes |
# |
Sep 6th 2019, 20:13 |
ricksaccous |
i mean exists |
# |
Sep 6th 2019, 20:13 |
ricksaccous |
in 1.3 |
# |
Sep 6th 2019, 20:13 |
ricksaccous |
i'm so glad contain still exists |
# |
Sep 6th 2019, 20:12 |
alexdd55976 |
all made by myself |
# |
Sep 6th 2019, 20:12 |
alexdd55976 |
online shop |
# |
Sep 6th 2019, 20:12 |
alexdd55976 |
its not too bad |
# |
Sep 6th 2019, 20:12 |
ricksaccous |
lol |
# |
Sep 6th 2019, 20:12 |
ricksaccous |
you enjoy it? @alexdd55976 |
# |
Sep 6th 2019, 20:11 |
alexdd55976 |
cake1.x :) |
# |
Sep 6th 2019, 20:11 |
alexdd55976 |
oh.. finally working on an old project again… |
# |
Sep 6th 2019, 19:59 |
ricksaccous |
TableClass->setConnection('connectionName'); |
# |
Sep 6th 2019, 19:55 |
itmpls |
a table's `defaultConnectionName` method returns the schema to use, but what if im looping through multiple ones? what's a recommended way to set that dynamically? |
# |
Sep 6th 2019, 19:34 |
emiliano |
ok, I will test, thanks a lot |
# |
Sep 6th 2019, 19:30 |
ndm |
``` $this->removeBehavior('AwsCognito'); $this->addBehavior('CognitoUsers'); ``` |
# |
Sep 6th 2019, 19:29 |
ndm |
The `implementedMethods` option will just create an alias that you can call via the table object where the behavior is attached to, it won't change any implementation details. Extending the behavior is OK if you need to change what it does, just unload the original behavior first. |
# |
Sep 6th 2019, 19:29 |
ndm |
What would you expect that code to do? |
# |
Sep 6th 2019, 19:28 |
emiliano |
sorry for the trouble but I'm working with that and thanks a lot for your time |
# |
Sep 6th 2019, 19:25 |
emiliano |
$this->addBehavior('CognitoUsers', Configure::read('AwsCognito')); $this->addBehavior('CognitoUsers', [ 'implementedMethods' => [ 'beforeSaveIdata' => 'beforeSave', ] ] ); |
# |
Sep 6th 2019, 19:25 |
emiliano |
and this: |
# |
Sep 6th 2019, 19:25 |
slackebot |
Best solution for most cases. */ $entity = $this->createCognitoUserIdata($entity); }else{ //enable/disable user if($entity->active andand $entity->isDirty('active')){ $this->enableCognitoUser($entity); }elseif(!$entity->active andand $entity->isDirty('active')){ $this->disableCognitoUser($entity); } } } |
# |
Sep 6th 2019, 19:25 |
emiliano |
protected $_defaultConfig = [ 'implementedMethods' => [ 'beforeSaveIdata' => 'beforeSave', ] ]; public function beforeSaveIdata(Event $event, EntityInterface $entity, ArrayObject $options) { if($entity->isNew()){ /* better to have the cognito creation callback be beforeSave instead of afterSave, so that we only create users once we're sure they're in the cognito user pool. |
# |
Sep 6th 2019, 19:24 |
emiliano |
if use a public function? for example, I test but dont work beforeSaveIdata -> beforeSave |
# |
Sep 6th 2019, 19:23 |
emiliano |
Is there no way to use only that function that I need to replace? |
# |
Sep 6th 2019, 19:22 |
emiliano |
ok, thanks a lot |