-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMS v3 changes #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PeterMis just a quick modification to add an option for checkbox
@@ -261,6 +261,14 @@ public function getCheckbox($key) | |||
$value = $this->collection->get($key); | |||
|
|||
// Validate the parameter | |||
return ($value === 'on' || $value === 1 || $value === '1' || $value === 'true' || $value === true); | |||
return ($value === 'on' || $value === 1 || $value === '1' || $value === 'true' || $value === true) ? 1 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make this change optional to support applications which have been written to expect true/false.
@@ -71,7 +69,13 @@ public function getIntArray($key, $options = []); | |||
|
|||
/** | |||
* @param string $key The name of the key | |||
* @return bool | |||
* @return integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @return integer | |
* @return integer|bool |
No description provided.