public function SharethisManager::toBoolean in ShareThis 8.2
Converts given value to boolean.
@todo To be replaced with bool
Parameters
string $val: Which value to convert to boolean.
Return value
bool Return TRUE or FALSE.
Overrides SharethisManagerInterface::toBoolean
1 call to SharethisManager::toBoolean()
- SharethisManager::getShareThisLightOptions in src/
SharethisManager.php - Function is creating options to be passed to stLight.
File
- src/
SharethisManager.php, line 204
Class
- SharethisManager
- Defines an SharethisManager service.
Namespace
Drupal\sharethisCode
public function toBoolean($val) {
if (strtolower(trim($val)) === 'false') {
return FALSE;
}
else {
return (bool) $val;
}
}