Commit de008540 authored by Ad Schellevis's avatar Ad Schellevis

(captiveportal, new) extend model logic

parent f9f75296
......@@ -50,4 +50,18 @@ class CaptivePortal extends BaseModel
}
return null;
}
/**
* check if module is enabled
* @return bool is the captive portal enabled (1 or more active zones)
*/
public function isEnabled()
{
foreach ($this->zones->zone->__items as $zone) {
if ((string)$zone->enabled == "1") {
return true;
}
}
return false;
}
}
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