mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-03 03:37:52 +02:00
Options API: renamed exist() to exists() method
This commit is contained in:
@@ -169,7 +169,7 @@
|
|||||||
* Check if option exist
|
* Check if option exist
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* if (Option::exist('pages_limit')) {
|
* if (Option::exists('pages_limit')) {
|
||||||
* // do something...
|
* // do something...
|
||||||
* }
|
* }
|
||||||
* </code>
|
* </code>
|
||||||
@@ -177,12 +177,12 @@
|
|||||||
* @param string $option Name of option to check.
|
* @param string $option Name of option to check.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function exist($option) {
|
public static function exists($option) {
|
||||||
|
|
||||||
// Redefine vars
|
// Redefine vars
|
||||||
$option = (string) $option;
|
$option = (string) $option;
|
||||||
|
|
||||||
// Check if option exist
|
// Check if option exists
|
||||||
return (count(Option::$options->select('[name="'.$option.'"]', null)) > 0) ? true : false;
|
return (count(Option::$options->select('[name="'.$option.'"]', null)) > 0) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user