Unverified Commit 7793f208 authored by Esteban Zeller's avatar Esteban Zeller Committed by GitHub

Added has function to directive

parent 2db4be9b
...@@ -27,6 +27,22 @@ final class SettingDirective ...@@ -27,6 +27,22 @@ final class SettingDirective
return setting($this->settingName, $this->locale, $this->default); return setting($this->settingName, $this->locale, $this->default);
} }
/**
* Check if a setting is set and is not empty
* @param array $arguments
* @return boolean
*/
public function has($arguments)
{
$value = $this->show($arguments);
if (empty($value)) {
return false;
} else {
return true;
}
}
/** /**
* @param array $arguments * @param array $arguments
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment