Skip to content

Conversation

@bancer
Copy link
Collaborator

@bancer bancer commented Feb 20, 2017

No description provided.

* Holds the root of the session key for data storage.
*
* @var string
*/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember my cake code too well, how do users customize this? Should this perhaps be an argument or an option in initialize()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be an option in the component options array

public $components = array(
    'Wizard.Wizard' => array(
        'sessionRootKey' => 'MyWizard',
    ),
); 

or it can be set in the controller's beforeFilter()

$this->Wizard->sessionRootKey = 'MyWizard';

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I was just wondering what sort of ways it could automatically be set once and work with both the component and helper.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that works with both the component and the helper. Nothing extra should be done in order to pass this setting to the helper.

@ProLoser ProLoser merged commit a898116 into ProLoser:master Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants