Skip to content

[3.0] Moving callback condition to config #54

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

Merged
merged 2 commits into from
Jan 11, 2018
Merged

[3.0] Moving callback condition to config #54

merged 2 commits into from
Jan 11, 2018

Conversation

lk77
Copy link
Contributor

@lk77 lk77 commented Jan 10, 2018

Hello,

i have moved the callback condition to config.

see #53 and #49

thanks.

@@ -161,7 +161,7 @@ public function parameterize($attributes = [])
*/
protected function isCallbackFunction($value, $key)
{
return Str::startsWith(trim($value), ['$', '$.', 'function']) || Str::contains($key, 'editor');
return Str::startsWith(trim($value), config('datatables-html.callback', ['$', '$.', 'function'])) || Str::contains($key, 'editor');
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe we can use the config property instead since we already injected it?

$this->config->get('datatables-html.callback', ['$', '$.', 'function'])

@lk77
Copy link
Contributor Author

lk77 commented Jan 10, 2018

yes, sorry, the config helper call don't even worked, my bad,
i've corrected it.

thanks.

@lk77 lk77 changed the title Moving callback condition to config [3.0] Moving callback condition to config Jan 10, 2018
@yajra yajra merged commit a39da1d into yajra:3.0 Jan 11, 2018
@yajra
Copy link
Owner

yajra commented Jan 11, 2018

Released on v3.5.2, thanks a lot 👍

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